[sword-devel] Linking error with Sword-1.5.11

Ben Morgan benpmorgan at gmail.com
Sat Sep 6 03:24:46 MST 2008


Hi,


In libsword, look for the macro definitions section in the project
configuration options. Try removing the macro SWMAKINGDLL. Also, make sure
you haven't defined SWUSINGDLL in the project which is using it
These define __declspec things, for use in building dlls.

Hope this helps. I haven't tried building with VC2008, though.

-- 
God Bless,
Ben
-------------------------------------------------------------------------------------------
The Lord is not slow to fulfill his promise as some count slowness,
but is patient toward you, not wishing that any should perish,
but that all should reach repentance.
2 Peter 3:9 (ESV)
On 06/09/2008, Hlunboi <hlunguite at gmail.com> wrote:
>
> Hi,
>
> I am trying to static link libsword.lib in my MFC application. The .lib is
> compiled from sword-1.5.11.
> I am using visual studio 2008. I got the following warning and error.
>
> libsword.lib(regex.obj) : warning LNK4217: locally defined symbol _isxdigit
> imported in function _regex_compile
> 1>libsword.lib(url.obj) : warning LNK4049: locally defined symbol _isxdigit
> imported
> 1>libsword.lib(regex.obj) : warning LNK4217: locally defined symbol
> _isupper imported in function _regex_compile
> 1>libsword.lib(regex.obj) : warning LNK4217: locally defined symbol
> _ispunct imported in function _regex_compile
> 1>libsword.lib(regex.obj) : warning LNK4217: locally defined symbol
> _islower imported in function _regex_compile
> 1>libsword.lib(regex.obj) : warning LNK4217: locally defined symbol
> _isspace imported in function _regex_compile
> 1>libsword.lib(regex.obj) : warning LNK4217: locally defined symbol
> _isprint imported in function _regex_compile
> 1>libsword.lib(regex.obj) : warning LNK4217: locally defined symbol
> _iscntrl imported in function _regex_compile
> 1>libsword.lib(regex.obj) : warning LNK4217: locally defined symbol
> _isalnum imported in function _regex_compile
> 1>libsword.lib(regex.obj) : warning LNK4217: locally defined symbol
> _tolower imported in function _regcomp
> 1>OLDNAMES.lib(close.obi) : warning LNK4049: locally defined symbol __close
> imported
> 1>OLDNAMES.lib(write.obi) : warning LNK4049: locally defined symbol __write
> imported
> 1>OLDNAMES.lib(read.obi) : warning LNK4049: locally defined symbol __read
> imported
> 1>OLDNAMES.lib(stricmp.obi) : warning LNK4049: locally defined symbol
> __stricmp imported
> 1>libsword.lib(treekey.obj) : error LNK2001: unresolved external symbol
> __imp__strtok
> 1>libsword.lib(localemgr.obj) : error LNK2001: unresolved external symbol
> __imp__strtok
> 1>libsword.lib(treekeyidx.obj) : error LNK2001: unresolved external symbol
> __imp__strtok
> 1>libsword.lib(swmgr.obj) : error LNK2019: unresolved external symbol
> __imp__strtok referenced in function "public: static void __cdecl
> sword::SWMgr::findConfig(char *,char * *,char * *,class std::list<class
> sword::SWBuf,class std::allocator<class sword::SWBuf> > *,class
> sword::SWConfig *)" (?findConfig at SWMgr@sword@@SAXPADPAPAD1PAV?$list at VSWBuf
> @sword@@V?$allocator at VSWBuf@sword@@@std@@@std@@PAVSWConfig at 2@@Z)
> 1>libsword.lib(swconfig.obj) : error LNK2001: unresolved external symbol
> __imp__strtok
> 1>libsword.lib(rawtext.obj) : error LNK2001: unresolved external symbol
> __imp__strtok
> 1>libsword.lib(rawtext4.obj) : error LNK2001: unresolved external symbol
> __imp__strtok
> 1>libsword.lib(swbuf.obj) : error LNK2019: unresolved external symbol
> __imp__vsprintf referenced in function "public: void __cdecl
> sword::SWBuf::setFormatted(char const *,...)" (?setFormatted at SWBuf@sword@
> @QAAXPBDZZ)
> 1>libsword.lib(swlog.obj) : error LNK2001: unresolved external symbol
> __imp__vsprintf
> 1>libsword.lib(swbuf.obj) : error LNK2019: unresolved external symbol
> __imp__vsnprintf referenced in function "public: void __cdecl
> sword::SWBuf::setFormatted(char const *,...)" (?setFormatted at SWBuf@sword@
> @QAAXPBDZZ)
> 1>libsword.lib(unicodertf.obj) : error LNK2001: unresolved external symbol
> __imp__sprintf
> 1>libsword.lib(utf8html.obj) : error LNK2001: unresolved external symbol
> __imp__sprintf
> 1>libsword.lib(zld.obj) : error LNK2001: unresolved external symbol
> __imp__sprintf
> 1>libsword.lib(greeklexattribs.obj) : error LNK2001: unresolved external
> symbol __imp__sprintf
> 1>libsword.lib(versekey.obj) : error LNK2001: unresolved external symbol
> __imp__sprintf
> 1>libsword.lib(treekeyidx.obj) : error LNK2019: unresolved external symbol
> __imp__sprintf referenced in function "public: void __thiscall
> sword::FileMgr::`default constructor closure'(void)" (??_FFileMgr at sword
> @@QAEXXZ)
> 1>libsword.lib(thmlscripref.obj) : error LNK2001: unresolved external
> symbol __imp__sprintf
> 1>libsword.lib(rawfiles.obj) : error LNK2001: unresolved external symbol
> __imp__sprintf
> 1>libsword.lib(zverse.obj) : error LNK2001: unresolved external symbol
> __imp__sprintf
> 1>libsword.lib(zstr.obj) : error LNK2001: unresolved external symbol
> __imp__sprintf
> 1>libsword.lib(osisstrongs.obj) : error LNK2001: unresolved external symbol
> __imp__sprintf
> 1>libsword.lib(thmlstrongs.obj) : error LNK2001: unresolved external symbol
> __imp__sprintf
> 1>libsword.lib(thmlfootnotes.obj) : error LNK2001: unresolved external
> symbol __imp__sprintf
> 1>libsword.lib(thmlheadings.obj) : error LNK2001: unresolved external
> symbol __imp__sprintf
> 1>libsword.lib(gbfstrongs.obj) : error LNK2001: unresolved external symbol
> __imp__sprintf
> 1>libsword.lib(gbffootnotes.obj) : error LNK2001: unresolved external
> symbol __imp__sprintf
> 1>libsword.lib(osisheadings.obj) : error LNK2001: unresolved external
> symbol __imp__sprintf
> 1>libsword.lib(osisfootnotes.obj) : error LNK2001: unresolved external
> symbol __imp__sprintf
> 1>libsword.lib(rawgenbook.obj) : error LNK2001: unresolved external symbol
> __imp__sprintf
> 1>libsword.lib(rawstr.obj) : error LNK2001: unresolved external symbol
> __imp__sprintf
> 1>libsword.lib(rawld.obj) : error LNK2001: unresolved external symbol
> __imp__sprintf
> 1>libsword.lib(rawld4.obj) : error LNK2001: unresolved external symbol
> __imp__sprintf
> 1>libsword.lib(rawverse.obj) : error LNK2001: unresolved external symbol
> __imp__sprintf
> 1>libsword.lib(rawverse4.obj) : error LNK2001: unresolved external symbol
> __imp__sprintf
> 1>libsword.lib(rawstr4.obj) : error LNK2001: unresolved external symbol
> __imp__sprintf
> 1>libsword.lib(filemgr.obj) : error LNK2001: unresolved external symbol
> __imp__sprintf
> 1>libsword.lib(url.obj) : error LNK2001: unresolved external symbol
> __imp__strstr
> 1>libsword.lib(thmlosis.obj) : error LNK2001: unresolved external symbol
> __imp__strstr
> 1>libsword.lib(osisrtf.obj) : error LNK2001: unresolved external symbol
> __imp__strstr
> 1>libsword.lib(gbfwebif.obj) : error LNK2001: unresolved external symbol
> __imp__strstr
> 1>libsword.lib(osiswebif.obj) : error LNK2001: unresolved external symbol
> __imp__strstr
> 1>libsword.lib(gbfhtml.obj) : error LNK2001: unresolved external symbol
> __imp__strstr
> 1>libsword.lib(thmlhtmlhref.obj) : error LNK2001: unresolved external
> symbol __imp__strstr
> 1>libsword.lib(gbfrtf.obj) : error LNK2001: unresolved external symbol
> __imp__strstr
> 1>libsword.lib(gbfosis.obj) : error LNK2001: unresolved external symbol
> __imp__strstr
> 1>libsword.lib(osisredletterwords.obj) : error LNK2001: unresolved external
> symbol __imp__strstr
> 1>libsword.lib(thmlmorph.obj) : error LNK2001: unresolved external symbol
> __imp__strstr
> 1>libsword.lib(thmllemma.obj) : error LNK2001: unresolved external symbol
> __imp__strstr
> 1>libsword.lib(thmlhtml.obj) : error LNK2001: unresolved external symbol
> __imp__strstr
> 1>libsword.lib(swmodule.obj) : error LNK2019: unresolved external symbol
> __imp__strstr referenced in function __catch$?search at SWModule@sword@
> @UAEAAVListKey at 2@PBDHHPAVSWKey at 2@PA_NP6AXDPAX at Z3@Z$0
> 1>libsword.lib(osisplain.obj) : error LNK2001: unresolved external symbol
> __imp__strstr
> 1>libsword.lib(osisfootnotes.obj) : error LNK2001: unresolved external
> symbol __imp__strstr
> 1>libsword.lib(osismorph.obj) : error LNK2001: unresolved external symbol
> __imp__strstr
> 1>libsword.lib(zstr.obj) : error LNK2001: unresolved external symbol
> __imp__strncpy
> 1>libsword.lib(regex.obj) : error LNK2001: unresolved external symbol
> __imp__strncpy
> 1>libsword.lib(rawstr4.obj) : error LNK2019: unresolved external symbol
> __imp__strncpy referenced in function "public: void __thiscall
> sword::RawStr4::readText(long,unsigned long *,char * *,class sword::SWBuf
> &)" (?readText at RawStr4@sword@@QAEXJPAKPAPADAAVSWBuf at 2@@Z)
> 1>libsword.lib(rawstr.obj) : error LNK2001: unresolved external symbol
> __imp__strncpy
> 1>libsword.lib(utilxml.obj) : error LNK2001: unresolved external symbol
> __imp__strncpy
> 1>libsword.lib(zverse.obj) : error LNK2001: unresolved external symbol
> __imp__strncpy
> 1>libsword.lib(filemgr.obj) : error LNK2019: unresolved external symbol
> __imp___stat64i32 referenced in function _stat
> 1>libsword.lib(filemgr.obj) : error LNK2019: unresolved external symbol
> __imp__close referenced in function "private: virtual __thiscall
> sword::FileDesc::~FileDesc(void)" (??1FileDesc at sword@@EAE at XZ)
> 1>OLDNAMES.lib(close.obi) : error LNK2001: unresolved external symbol
> __imp__close
> 1>libsword.lib(filemgr.obj) : error LNK2019: unresolved external symbol
> __imp__open referenced in function "private: int __thiscall
> sword::FileMgr::sysOpen(class sword::FileDesc *)" (?sysOpen at FileMgr@sword@
> @AAEHPAVFileDesc at 2@@Z)
> 1>OLDNAMES.lib(open.obi) : error LNK2001: unresolved external symbol
> __imp__open
> 1>libsword.lib(filemgr.obj) : error LNK2019: unresolved external symbol
> __imp__access referenced in function "private: int __thiscall
> sword::FileMgr::sysOpen(class sword::FileDesc *)" (?sysOpen at FileMgr@sword@
> @AAEHPAVFileDesc at 2@@Z)
> 1>OLDNAMES.lib(access.obi) : error LNK2001: unresolved external symbol
> __imp__access
> 1>libsword.lib(filemgr.obj) : error LNK2019: unresolved external symbol
> __imp__lseek referenced in function "private: int __thiscall
> sword::FileMgr::sysOpen(class sword::FileDesc *)" (?sysOpen at FileMgr@sword@
> @AAEHPAVFileDesc at 2@@Z)
> 1>OLDNAMES.lib(lseek.obi) : error LNK2001: unresolved external symbol
> __imp__lseek
> 1>libsword.lib(filemgr.obj) : error LNK2019: unresolved external symbol
> __imp__mkdir referenced in function "public: static int __cdecl
> sword::FileMgr::createParent(char const *)" (?createParent at FileMgr@sword@
> @SAHPBD at Z)
> 1>OLDNAMES.lib(mkdir.obi) : error LNK2001: unresolved external symbol
> __imp__mkdir
> 1>libsword.lib(filemgr.obj) : error LNK2019: unresolved external symbol
> __imp__write referenced in function "public: static int __cdecl
> sword::FileMgr::copyFile(char const *,char const *)" (?copyFile at FileMgr
> @sword@@SAHPBD0 at Z)
> 1>OLDNAMES.lib(write.obi) : error LNK2001: unresolved external symbol
> __imp__write
> 1>libsword.lib(filemgr.obj) : error LNK2019: unresolved external symbol
> __imp__read referenced in function "public: static int __cdecl
> sword::FileMgr::copyFile(char const *,char const *)" (?copyFile at FileMgr
> @sword@@SAHPBD0 at Z)
> 1>OLDNAMES.lib(read.obi) : error LNK2001: unresolved external symbol
> __imp__read
> 1>libsword.lib(filemgr.obj) : error LNK2019: unresolved external symbol
> __imp__remove referenced in function "public: static int __cdecl
> sword::FileMgr::removeFile(char const *)" (?removeFile at FileMgr@sword@
> @SAHPBD at Z)
> 1>libsword.lib(rawld.obj) : error LNK2019: unresolved external symbol
> __imp__toupper referenced in function "private: void __thiscall
> sword::RawLD::strongsPad(char *)" (?strongsPad at RawLD@sword@@AAEXPAD at Z)
> 1>libsword.lib(rawld4.obj) : error LNK2001: unresolved external symbol
> __imp__toupper
> 1>libsword.lib(zld.obj) : error LNK2001: unresolved external symbol
> __imp__toupper
> 1>libsword.lib(url.obj) : error LNK2001: unresolved external symbol
> __imp__toupper
> 1>libsword.lib(zipcomprs.obj) : error LNK2019: unresolved external symbol
> __imp__fprintf referenced in function "public: virtual void __thiscall
> sword::ZipCompress::Encode(void)" (?Encode at ZipCompress@sword@@UAEXXZ)
> 1>libsword.lib(dirent.obj) : error LNK2019: unresolved external symbol
> __imp___findfirst64i32 referenced in function "struct DIR * __cdecl
> opendir(char const *)" (?opendir@@YAPAUDIR@@PBD at Z)
> 1>libsword.lib(dirent.obj) : error LNK2019: unresolved external symbol
> __imp___findclose referenced in function "int __cdecl closedir(struct DIR
> *)" (?closedir@@YAHPAUDIR@@@Z)
> 1>libsword.lib(dirent.obj) : error LNK2019: unresolved external symbol
> __imp___findnext64i32 referenced in function "struct dirent * __cdecl
> readdir(struct DIR *)" (?readdir@@YAPAUdirent@@PAUDIR@@@Z)
> 1>libsword.lib(utilstr.obj) : error LNK2019: unresolved external symbol
> __imp__stricmp referenced in function "int __cdecl sword::stricmp(char const
> *,char const *)" (?stricmp at sword@@YAHPBD0 at Z)
> 1>OLDNAMES.lib(stricmp.obi) : error LNK2001: unresolved external symbol
> __imp__stricmp
> 1>libsword.lib(versekey.obj) : error LNK2019: unresolved external symbol
> __imp__sscanf referenced in function "protected: virtual char __thiscall
> sword::VerseKey::parse(bool)" (?parse at VerseKey@sword@@MAED_N at Z)
> 1>OLDNAMES.lib(open.obi) : error LNK2001: unresolved external symbol
> __imp___open
> 1>OLDNAMES.lib(access.obi) : error LNK2001: unresolved external symbol
> __imp___access
> 1>OLDNAMES.lib(lseek.obi) : error LNK2001: unresolved external symbol
> __imp___lseek
> 1>OLDNAMES.lib(mkdir.obi) : error LNK2001: unresolved external symbol
> __imp___mkdir
>
>
> I really appreciate any help in this.
>
> Regards
> Hlun
>
>
> _______________________________________________
> sword-devel mailing list: sword-devel at crosswire.org
> http://www.crosswire.org/mailman/listinfo/sword-devel
> Instructions to unsubscribe/change your settings at above page
>
-------------- next part --------------
An HTML attachment was scrubbed...
URL: http://www.crosswire.org/pipermail/sword-devel/attachments/20080906/b0e84dee/attachment-0001.html 


More information about the sword-devel mailing list