[sword-devel] Building libsword on windows
Daniel Sheffield
d.j.yotta at gmail.com
Tue Dec 30 20:29:03 MST 2014
Hi all,
I've been having trouble building libsword.dll for windows.
I've followed the information here: http://www.crosswire.org/wiki/Tutorial:Compiling_%26_Installing_SWORD_on_Windows
Finally figured out (searching the sword-devel archives) that all I needed to do was rename icu to icu-sword and similarly rename the curl output dir to what MSVS was expecting and I was able to build the solution.
However: I can't seem to link against the libsword.dll/libsword.lib.
The only way I have been able to successfully build my project with libsword is by adding objects.a (generated by cross-compiling libsword on linux using mxe) to the list of sources which effectively copies all the objects in.
This is what I get at compile time when I link against libsword.dll
agents\sword\sword.o:sword.cpp:(.text+0x41): undefined reference to `sword::MarkupFilterMgr::MarkupFilterMgr(char, char)'
agents\sword\sword.o:sword.cpp:(.text+0x5c): undefined reference to `sword::SWMgr::SWMgr(sword::SWFilterMgr*, bool)'
agents\sword\sword.o:sword.cpp:(.text+0x95): undefined reference to `sword::SWKey::SWKey(char const*)'
agents\sword\sword.o:sword.cpp:(.text+0xb5): undefined reference to `sword::SWKey::~SWKey()'
agents\sword\sword.o:sword.cpp:(.text+0xdd): undefined reference to `sword::SWModule::renderText(char const*, int, bool)'
agents\sword\sword.o:sword.cpp:(.text+0x10b): undefined reference to `sword::SWMgr::~SWMgr()'
agents\sword\sword.o:sword.cpp:(.text+0x129): undefined reference to `sword::SWKey::~SWKey()'
agents\sword\sword.o:sword.cpp:(.text+0x13a): undefined reference to `sword::SWMgr::~SWMgr()'
agents\sword\sword.o:sword.cpp:(.text$_ZN5sword5SWBufD1Ev[__ZN5sword5SWBufD1Ev]+0xfffffe6c): undefined reference to `sword::SWBuf::nullStr'
These compile time errors disappear when I add objects.a to the list of sources AND there are no run-time errors either (despite neither linking against icu).
I have no idea whats going on. Perhaps it's because I build libsword.dll with MS Visual Studio and am trying to link it with MinGW's g++...
If anyone can help I'd appreciate it!
Daniel Sheffield
Associate Engineer - Software
Level 2, Building A, The Millennium Building Phase 2, 600 Great South Road
Ellerslie,
Auckland,
1051
+64 9 926 2895 Office
+64 21 1408 708 Mobile
http://www.emulex.com
On Tue, 30 Dec 2014, Troy A. Griffitts wrote:
> Done. Thanks for subscribing!
>
>
> On 12/30/2014 03:21 PM, Daniel Sheffield wrote:
>> Sorry to bother you yet again...
>> I filled out some form
>> http://www.crosswire.org/mailman/listinfo/sword-devel and was directed to
>> send an e-mail to sword-support to verify I am not a robot.
>> My question is when my e-mail and password will be active on sword-devel. I
>> just tried it now and was rejected.
>>
>> I'm aware this all takes time - I'm not in a rush - just checking that I've
>> actually completed all the steps to subscribe.
>>
>> Cheers,
>>
>> Daniel Sheffield
>>
>> Associate Engineer - Software
>> Level 2, Building A, The Millennium Building Phase 2, 600 Great South Road
>> Ellerslie,
>> Auckland,
>> 1051
>>
>> +64 9 926 2895 Office
>> +64 21 1408 708 Mobile
>> http://www.emulex.com
>>
>> On Tue, 30 Dec 2014, Peter von Kaehne wrote:
>>
>>>
>>> Daniel, i think you should subscribe to sword-devel. Sword support is more
>>> about people not being
>>> able to understand the programms they downloaded etc. I am sure your
>>> problem has been discussed
>>> several times on that list.
>>>
>>> Biblecs might be a VS programme, but most others use msys which is a pared
>>> down unixy
>>> buildenvironment
>>>
>>> On 30 Dec 2014 20:49, Daniel Sheffield <d.j.yotta at gmail.com> wrote:
>>> Yeah, I've stumbled accross MSYS which appears to a particular build
>>> environment on
>>> windows?
>>>
>>> In regards to my linking issuse, the latest news is that I have managed to
>>> link against the
>>> libsword.dll.a and, because of the run time errors, tracked the undefined
>>> references down to
>>> the icu*54.dlls. I'll try recompiling them (I also downloaded pre-compiled
>>> ones for icu too -
>>> dunno if I've tried those).
>>>
>>> I don't know why, but when I use libsword.a instead of libsword.dll.a, I
>>> get neither compile
>>> time nor run time errors. Then again, I haven't tried actually calling the
>>> sword functions yet
>>> in my windows port - just wanted it to compile first!
>>>
>>> Atm, I'm reading up about all these forms of library files. I think that
>>> will help me figure
>>> out what is going on.
>>>
>>> Cheers,
>>> Daniel
>>>
>>> --
>>> In the beginning Kibo created the Internet. Now the Internet was formless,
>>> and empty.
>>> Randomness was upon the face of computing, and the Spirit of ARPA moved
>>> upon the face of the
>>> computers. Then Kibo said, "Let there be data": and there was data. Kibo
>>> saw the data, and it
>>> was good, so Kibo divided the data from the randomness, and Kibo named the
>>> data Information,
>>> and the randomness Clueless. And the Information and the Clueless were the
>>> first Network.
>>>
>>> On Wed, Dec 31, 2014 at 12:37 AM, Peter von Kaehne <refdoc at crosswire.org>
>>> wrote:
>>> Not a programmer, but i am thinking , most things are done
>>> successfully via msys
>>> rather than via MS stuff.
>>>
>>> On 30 Dec 2014 05:34, Daniel Sheffield <d.j.yotta at gmail.com> wrote:
>>> >
>>> > Hi,
>>> >
>>> > I develop mainly on linux and have been linking to the sword
>>> library for a
>>> project I'm working on (bibq hosted on sourceforge).
>>> >
>>> > I have ported my project also to windows, but have been having
>>> difficulty
>>> compiling libsword.dll.
>>> > Xiphos was the only package I could find that had this dill
>>> precompiled and I
>>> tried using that.
>>> > After suffering dll hell, I finally managed to find all the dlls
>>> the xiphos
>>> libsword.dll depended on only to have missing functions at runtime.
>>> >
>>> > Idealy, I want to compile libsword.dll from scratch but I have
>>> tried every which
>>> way to do this.
>>> >
>>> > . I followed the instructions here:
>>> http://crosswire.org/wiki/Tutorial:Compiling_%26_Installing_SWORD_on_Windows
>>> eventually building all the dependancies except clucene which eludes
>>> all attempts
>>> at building on windows. I attempted compiling without clucene and
>>> appeared to get
>>> errors that didn't relate to clucene anyhow and couldn't progress
>>> any further.
>>> > . I then tried cross-compiling on linux targeted at windows. I
>>> used mxe and
>>> things went pretty smoothly but I get link errors at the final step
>>> of linking
>>> libsword.dll (to do with icu).
>>> >
>>> > I'm about ready to give up and use jsword - but that feels so
>>> wrong!
>>> >
>>> > I guess I'm not really expecting to be hand-held through the build
>>> process, but
>>> my main question is why I can't simply build using MS Visual Studio?
>>> There seems
>>> to be a problem with MS Visual Studio 2013 as I've encountered even
>>> errors such as
>>> "can not find stdio.h/stdlib.h" when generating the clucene solution
>>> with cmake.
>>> The solution file for SWORD also doesn't build. I'm most likely
>>> noobing something
>>> here though because I never develop on windows before - other than
>>> "hello world"
>>> type stuff. And now I know why!
>>> >
>>> > Cheers if you can help.
>>> > Daniel
>>> > --
>>> > In the beginning Kibo created the Internet. Now the Internet was
>>> formless, and
>>> empty. Randomness was upon the face of computing, and the Spirit of
>>> ARPA moved
>>> upon the face of the computers. Then Kibo said, "Let there be data":
>>> and there was
>>> data. Kibo saw the data, and it was good, so Kibo divided the data
>>> from the
>>> randomness, and Kibo named the data Information, and the randomness
>>> Clueless. And
>>> the Information and the Clueless were the first Network.
>>>
>>>
>>>
>>>
>>
>> _______________________________________________
>> sword-support mailing list
>> sword-support at crosswire.org
>
>
More information about the sword-devel
mailing list