[sword-devel] Sword Windows library problem

Jon Behrens jbb at crimsonthread.com
Fri Sep 5 10:50:51 MST 2014


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()}




More information about the sword-devel mailing list