OK, I've narrowed things down a bit.
First, the problem may very well be with Windows 8.1 which doesn't
always play nice
with Win32 applications. After following all the directions, Dependency
Walker shows
mixed mode x86 and x64 libraries which causes it to give up.
I've rattled up a Windows 7 virtual machine which I'm going to try and
use with VS2010.
Couple of things with the Tutorial on compiling and installing Sword
with Windows here:
http://crosswire.org/wiki/Tutorial:Compiling_%26_Installing_SWORD_on_Windows
Everything's fine until I get down to CLucine. There it says to:
set BOOST_BUILD_PATH=$dir$\boost\tools\build\v2
That directory doesn't exist and CMake complains that it can't find
Boost (the Boost directory
does exist, just not that subdirectory). Does anyone know what's
actually being looked for here?
The project file for Sword is for VS2012, I've got VS2010 and VS2013. I
can probably hive out a
VS2010 file from VS2013, but if anyone has a VS2010 project file, that
would be a blessing.
(VS2013 won't run under Windows7.)
When I was squirreling around with Win8.1 and VS2013, I found the
following linker errors
in the Sword project file:
../../../curl/builds/libcurl-vc10-x86-release-static-ipv6-sspi-spnego-winssl/lib
(should be ...libcurl-vc-x86... the 10 is wrong)
../../../icu-sword/lib
(should be ...icu... icu-sword is wrong unless you rename the icu
directory)
Thanks for any help
Be blessed,
Jon
On 9/6/2014 6:32 AM, Daniel Hughes wrote:
Your the first person to try the bindings on windows.
It could be the calling convention.
The bindings are written to use Cdecl calling convention.
It may be that Visual studio has built sword using the stdcall calling
convention.
I will need someone who knows more about c/c++ and the calling
conventions to comment on this.
You can try changing the calling convention in the bindings by editing
them in the NativeMethods.cs class to confirm this.
However if it turns out that sword does use a different calling
convention on windows to linux then that could be a problem. It may be
that you need to tell Visual Studio to build sword using Cdecl calling
convention.
On Sat, Sep 6, 2014 at 5:50 AM, Jon Behrens <[email protected]> wrote:
Hello
Having gotten the C# binding examples to work in Linux, I thought I'd try
the same thing in
Windows. I built libsword.dll using the instructions at:
http://crosswire.org/wiki/Tutorial:Compiling_%26_Installing_SWORD_on_Windows
After renaming the icu directory to icu-sword so the make file could find
it, everything builds
using Visual Studio 2013.
So then copy the Linux directory /bindings/csharp to a Windows directory and
open the project
in VS2013. Again everything builds properly.
When I try and run the lookup example, I get an exception saying that
libsword.dll is a program
with an incorrect format. In the trace below, the error is listed as in
CSSword, but it occurs when
CSSword tries to access libsword.dll
Anyone have any idea what's going on?
Best,
Jon
{"An attempt was made to load a program with an incorrect format. (Exception
from HRESULT: 0x8007000B)"}
[System.BadImageFormatException]: {"An attempt was made to load a
program with an incorrect format. (Exception from HRESULT: 0x8007000B)"}
Data: {System.Collections.ListDictionaryInternal}
HelpLink: null
HResult: -2147024885
InnerException: null
Message: "An attempt was made to load a program with an incorrect
format. (Exception from HRESULT: 0x8007000B)"
Source: "CSSword"
StackTrace: " at
Sword.NativeMethods.org_crosswire_sword_SWMgr_new()\r\n at
Sword.Manager..ctor() in
n:\\development\\swordCsharp\\csharp\\Manager.cs:line 28"
TargetSite: {IntPtr org_crosswire_sword_SWMgr_new()}
_______________________________________________
sword-devel mailing list: [email protected]
http://www.crosswire.org/mailman/listinfo/sword-devel
Instructions to unsubscribe/change your settings at above page
_______________________________________________
sword-devel mailing list: [email protected]
http://www.crosswire.org/mailman/listinfo/sword-devel
Instructions to unsubscribe/change your settings at above page
_______________________________________________
sword-devel mailing list: [email protected]
http://www.crosswire.org/mailman/listinfo/sword-devel
Instructions to unsubscribe/change your settings at above page