[sword-devel] Sword Python bindings for Windows

R Johnson ps16thypresenceisfullnessofjoy at gmail.com
Mon Oct 6 17:02:36 MST 2014


I also tried changing the command in step 3 ("setup.py build") to use 
libsword.lib rather than sword.lib by replacing the lines in the 
setup.py file:

     setup(name='sword',version='1.7.3',
     libraries=[('sword')],

with:

     setup(name='libsword',version='1.7.3',
     libraries=[('libsword')],

but I got the same errors that I did when I tried renaming sword.lib to 
libsword.lib.

I have attached the output from setup.py containing the errors, and 
would appreciate any ideas as to what is causing them. I'm a SWIG 
newbie, but could the errors mean that the SWIG interface (.i) files are 
missing the definitions of certain functions/attributes? (I really don't 
know what "unresolved external symbols" are, so this stuff is over my head.)

-- Timothy
-------------- next part --------------
...
Sword.cxx(85465) : warning C4101: 'e' : unreferenced local variable
C:\Program Files\Microsoft Visual Studio 10.0\VC\BIN\link.exe /DLL /nologo /INCREMENTAL:NO /LIBPATH:../../../../sword-build /LIBPATH:C:\Python34\libs /LIBPATH:C:\Python34\PCbuild libsword.lib /EXPORT:PyInit__Sword build\temp.win32-3.4\Release\Sword.obj /OUT:build\lib.win32-3.4\_Sword.pyd /IMPLIB:build\temp.win32-3.4\Release\_Sword.lib /MANIFESTFILE:build\temp.win32-3.4\Release\_Sword.pyd.manifest
   Creating library build\temp.win32-3.4\Release\_Sword.lib and object build\temp.win32-3.4\Release\_Sword.exp
Sword.obj : error LNK2019: unresolved external symbol "public: static char * sword::SWBuf::nullStr" (?nullStr at SWBuf@sword@@2PADA) referenced in function "char __cdecl sword_SWBuf_charAt2(class sword::SWBuf *,unsigned int)" (?sword_SWBuf_charAt2@@YADPAVSWBuf at sword@@I at Z)
Sword.obj : error LNK2019: unresolved external symbol "public: static class sword::SWVersion sword::SWVersion::currentVersion" (?currentVersion at SWVersion@sword@@2V12 at A) referenced in function _Swig_var_SWVersion_currentVersion_get
Sword.obj : error LNK2019: unresolved external symbol "public: static char const sword::RawVerse::nl" (?nl at RawVerse@sword@@2DB) referenced in function _Swig_var_RawVerse_nl_get
Sword.obj : error LNK2019: unresolved external symbol "public: static char const * const sword::zVerse::uniqueIndexID" (?uniqueIndexID at zVerse@sword@@2QBDB) referenced in function _Swig_var_zVerse_uniqueIndexID_get
Sword.obj : error LNK2019: unresolved external symbol "public: static char const sword::RawStr::nl" (?nl at RawStr@sword@@2DB) referenced in function _Swig_var_RawStr_nl_get
Sword.obj : error LNK2019: unresolved external symbol "public: static char const sword::RawStr4::nl" (?nl at RawStr4@sword@@2DB) referenced in function _Swig_var_RawStr4_nl_get
Sword.obj : error LNK2019: unresolved external symbol "struct sword::abbrev const * const sword::builtin_abbrevs" (?builtin_abbrevs at sword@@3QBUabbrev at 1@B) referenced in function _Swig_var_builtin_abbrevs_get
Sword.obj : error LNK2019: unresolved external symbol "public: static char const * const sword::SWMgr::MODTYPE_BIBLES" (?MODTYPE_BIBLES at SWMgr@sword@@2PBDB) referenced in function _Swig_var_SWMgr_MODTYPE_BIBLES_get
Sword.obj : error LNK2019: unresolved external symbol "public: static char const * const sword::SWMgr::MODTYPE_COMMENTARIES" (?MODTYPE_COMMENTARIES at SWMgr@sword@@2PBDB) referenced in function _Swig_var_SWMgr_MODTYPE_COMMENTARIES_get
Sword.obj : error LNK2019: unresolved external symbol "public: static char const * const sword::SWMgr::MODTYPE_LEXDICTS" (?MODTYPE_LEXDICTS at SWMgr@sword@@2PBDB) referenced in function _Swig_var_SWMgr_MODTYPE_LEXDICTS_get
Sword.obj : error LNK2019: unresolved external symbol "public: static char const * const sword::SWMgr::MODTYPE_GENBOOKS" (?MODTYPE_GENBOOKS at SWMgr@sword@@2PBDB) referenced in function _Swig_var_SWMgr_MODTYPE_GENBOOKS_get
Sword.obj : error LNK2019: unresolved external symbol "public: static char const * const sword::SWMgr::MODTYPE_DAILYDEVOS" (?MODTYPE_DAILYDEVOS at SWMgr@sword@@2PBDB) referenced in function _Swig_var_SWMgr_MODTYPE_DAILYDEVOS_get
Sword.obj : error LNK2019: unresolved external symbol "public: static bool sword::SWMgr::isICU" (?isICU at SWMgr@sword@@2_NA) referenced in function _Swig_var_SWMgr_isICU_set
Sword.obj : error LNK2019: unresolved external symbol "public: static char const * const sword::SWMgr::globalConfPath" (?globalConfPath at SWMgr@sword@@2PBDB) referenced in function _Swig_var_SWMgr_globalConfPath_get
Sword.obj : error LNK2019: unresolved external symbol "public: static int sword::FileMgr::CREAT" (?CREAT at FileMgr@sword@@2HA) referenced in function _Swig_var_FileMgr_CREAT_set
Sword.obj : error LNK2019: unresolved external symbol "public: static int sword::FileMgr::APPEND" (?APPEND at FileMgr@sword@@2HA) referenced in function _Swig_var_FileMgr_APPEND_set
Sword.obj : error LNK2019: unresolved external symbol "public: static int sword::FileMgr::TRUNC" (?TRUNC at FileMgr@sword@@2HA) referenced in function _Swig_var_FileMgr_TRUNC_set
Sword.obj : error LNK2019: unresolved external symbol "public: static int sword::FileMgr::RDONLY" (?RDONLY at FileMgr@sword@@2HA) referenced in function _Swig_var_FileMgr_RDONLY_set
Sword.obj : error LNK2019: unresolved external symbol "public: static int sword::FileMgr::RDWR" (?RDWR at FileMgr@sword@@2HA) referenced in function _Swig_var_FileMgr_RDWR_set
Sword.obj : error LNK2019: unresolved external symbol "public: static int sword::FileMgr::WRONLY" (?WRONLY at FileMgr@sword@@2HA) referenced in function _Swig_var_FileMgr_WRONLY_set
Sword.obj : error LNK2019: unresolved external symbol "public: static int sword::FileMgr::IREAD" (?IREAD at FileMgr@sword@@2HA) referenced in function _Swig_var_FileMgr_IREAD_set
Sword.obj : error LNK2019: unresolved external symbol "public: static int sword::FileMgr::IWRITE" (?IWRITE at FileMgr@sword@@2HA) referenced in function _Swig_var_FileMgr_IWRITE_set
Sword.obj : error LNK2019: unresolved external symbol "public: static char const * const sword::SWLocale::DEFAULT_LOCALE_NAME" (?DEFAULT_LOCALE_NAME at SWLocale@sword@@2PBDB) referenced in function _Swig_var_SWLocale_DEFAULT_LOCALE_NAME_get
Sword.obj : error LNK2019: unresolved external symbol "public: static int const sword::SWLog::LOG_ERROR" (?LOG_ERROR at SWLog@sword@@2HB) referenced in function _Swig_var_SWLog_LOG_ERROR_get
Sword.obj : error LNK2019: unresolved external symbol "public: static int const sword::SWLog::LOG_WARN" (?LOG_WARN at SWLog@sword@@2HB) referenced in function _Swig_var_SWLog_LOG_WARN_get
Sword.obj : error LNK2019: unresolved external symbol "public: static int const sword::SWLog::LOG_INFO" (?LOG_INFO at SWLog@sword@@2HB) referenced in function _Swig_var_SWLog_LOG_INFO_get
Sword.obj : error LNK2019: unresolved external symbol "public: static int const sword::SWLog::LOG_TIMEDINFO" (?LOG_TIMEDINFO at SWLog@sword@@2HB) referenced in function _Swig_var_SWLog_LOG_TIMEDINFO_get
Sword.obj : error LNK2019: unresolved external symbol "public: static int const sword::SWLog::LOG_DEBUG" (?LOG_DEBUG at SWLog@sword@@2HB) referenced in function _Swig_var_SWLog_LOG_DEBUG_get
Sword.obj : error LNK2019: unresolved external symbol "public: static int const sword::InstallMgr::MODSTAT_OLDER" (?MODSTAT_OLDER at InstallMgr@sword@@2HB) referenced in function _Swig_var_InstallMgr_MODSTAT_OLDER_get
Sword.obj : error LNK2019: unresolved external symbol "public: static int const sword::InstallMgr::MODSTAT_SAMEVERSION" (?MODSTAT_SAMEVERSION at InstallMgr@sword@@2HB) referenced in function _Swig_var_InstallMgr_MODSTAT_SAMEVERSION_get
Sword.obj : error LNK2019: unresolved external symbol "public: static int const sword::InstallMgr::MODSTAT_UPDATED" (?MODSTAT_UPDATED at InstallMgr@sword@@2HB) referenced in function _Swig_var_InstallMgr_MODSTAT_UPDATED_get
Sword.obj : error LNK2019: unresolved external symbol "public: static int const sword::InstallMgr::MODSTAT_NEW" (?MODSTAT_NEW at InstallMgr@sword@@2HB) referenced in function _Swig_var_InstallMgr_MODSTAT_NEW_get
Sword.obj : error LNK2019: unresolved external symbol "public: static int const sword::InstallMgr::MODSTAT_CIPHERED" (?MODSTAT_CIPHERED at InstallMgr@sword@@2HB) referenced in function _Swig_var_InstallMgr_MODSTAT_CIPHERED_get
Sword.obj : error LNK2019: unresolved external symbol "public: static int const sword::InstallMgr::MODSTAT_CIPHERKEYPRESENT" (?MODSTAT_CIPHERKEYPRESENT at InstallMgr@sword@@2HB) referenced in function _Swig_var_InstallMgr_MODSTAT_CIPHERKEYPRESENT_get
Sword.obj : error LNK2019: unresolved external symbol "public: __thiscall sword::ThMLHTMLHREF::MyUserData::MyUserData(class sword::SWModule const *,class sword::SWKey const *)" (??0MyUserData at ThMLHTMLHREF@sword@@QAE at PBVSWModule@2 at PBVSWKey@2@@Z) referenced in function "protected: virtual class sword::BasicFilterUserData * __thiscall sword::ThMLHTMLHREF::createUserData(class sword::SWModule const *,class sword::SWKey const *)" (?createUserData at ThMLHTMLHREF@sword@@MAEPAVBasicFilterUserData at 2@PBVSWModule at 2@PBVSWKey at 2@@Z)
build\lib.win32-3.4\_Sword.pyd : fatal error LNK1120: 35 unresolved externals
error: command 'C:\\Program Files\\Microsoft Visual Studio 10.0\\VC\\BIN\\link.exe' failed with exit status 1120


More information about the sword-devel mailing list