I tried to fix this by setting the CMake variable  
CMAKE_WINDOWS_EXPORT_ALL_SYMBOLS=TRUE
https://cmake.org/cmake/help/v3.4/prop_tgt/WINDOWS_EXPORT_ALL_SYMBOLS.html

But that didn’t help! I still get the same linker issue.

However, in the above linked Cmake help it says: For global data symbols, 
__declspec(dllimport) must still be used when compiling against the code in the 
.dll. All other function symbols will be automatically exported and imported by 
callers.

Aren’t we dealing with a „global data symbol“ in this case?

See also:
https://docs.microsoft.com/de-de/cpp/build/importing-into-an-application-using-declspec-dllimport?view=vs-2019

Best regards,
Tobias

From: Tobias Klein
Sent: Montag, 21. September 2020 11:29
To: SWORD Developers' Collaboration Forum
Subject: Re: [sword-devel] Latest SWORD trunk / Linking 
error/Missingsymbol:sword::InstallMgr::userDisclaimerConfirmed

I’m still having the same issue with the latest SWORD trunk when linking on 
Windows.

Since this wasn’t an issue with SWORD trunk from May (SVN Rev. 3747), is there 
a way to fix this in SWORD?

Best regards,
Tobias

From: Tobias Klein
Sent: Samstag, 29. August 2020 10:22
To: SWORD Developers' Collaboration Forum
Subject: Re: [sword-devel] Latest SWORD trunk / Linking error 
/Missingsymbol:sword::InstallMgr::userDisclaimerConfirmed

This occurred to me when building automatically via GitHub actions and that is 
always a full-rebuild.

I had this problem also in the past with manual Windows builds and the 
work-around was to “re-declare” the respective symbol in the software that 
links against Sword. I already had this issue before with sword::SWBuf::nullStr:

#if defined(_WIN32)
// For some reason this symbol is missing in the sword.dll on Windows, hence we 
include it here.
char * sword::SWBuf::nullStr = (char *)"";
#endif

Best regards,
Tobias



From: Troy A. Griffitts
Sent: Samstag, 29. August 2020 09:52
To: SWORD Developers' Collaboration Forum
Subject: Re: [sword-devel] Latest SWORD trunk / Linking error / 
Missingsymbol:sword::InstallMgr::userDisclaimerConfirmed

Hi Tobias,
This did receive a bit of a reorganization, but the symbol is declared in 
include/installmgr.h:97 and is initialized with the other statics in 
installmgr.cpp:75.
Have you tried a full rebuild?
Is anyone else having linking troubles?
Troy

On 8/29/20 9:20 AM, Tobias Klein wrote:
Hi Troy,
 
Any feedback regarding this one?
 
Thanks!
 
Best regards,
Tobias
 
From: Tobias Klein
Sent: Sonntag, 16. August 2020 11:10
To: SWORD Developers' Collaboration Forum
Subject: [sword-devel] Latest SWORD trunk / Linking error / Missing 
symbol:sword::InstallMgr::userDisclaimerConfirmed
 
Hi,
 
With the latest SWORD trunk I’m getting the following linking error:
 
Creating library 
D:\a\ezra-project\ezra-project\node_modules\node-sword-interface\build\Release\node_sword_interface.lib
 and object 
D:\a\ezra-project\ezra-project\node_modules\node-sword-interface\build\Release\node_sword_interface.exp
repository_interface.obj : error LNK2001: unresolved external symbol "public: 
static bool sword::InstallMgr::userDisclaimerConfirmed" 
(?userDisclaimerConfirmed@InstallMgr@sword@@2_NA) 
[D:\a\ezra-project\ezra-project\node_modules\node-sword-interface\build\node_sword_interface.vcxproj]
 
The symbol sword::InstallMgr::userDisclaimerConfirmed is missing in the 
generated SWORD dll. Did something recently change regarding this symbol or how 
it is included in the build (based on CMake and Visual Studio 2019)?
 
Best regards,
Tobias
_______________________________________________
sword-devel mailing list: sword-devel@crosswire.org
http://www.crosswire.org/mailman/listinfo/sword-devel
Instructions to unsubscribe/change your settings at above page
 

_______________________________________________
sword-devel mailing list: sword-devel@crosswire.org
http://www.crosswire.org/mailman/listinfo/sword-devel
Instructions to unsubscribe/change your settings at above page



_______________________________________________
sword-devel mailing list: sword-devel@crosswire.org
http://crosswire.org/mailman/listinfo/sword-devel
Instructions to unsubscribe/change your settings at above page

Reply via email to