Skip to content
New issue

Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.

By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.

Already on GitHub? Sign in to your account

Problems with win x64 build #44

Closed
CyberCMRX opened this issue Dec 26, 2012 · 5 comments
Closed

Problems with win x64 build #44

CyberCMRX opened this issue Dec 26, 2012 · 5 comments
Assignees
Milestone

Comments

@CyberCMRX
Copy link

  1. PocoDoc_x64 and ProGen_x64 dosn't compile. PocoJSONmtd.lib isn't built in the x64 version of the build script (the project doens't have x64 settings)
  2. Missing symbol when trying to link to an existing application.
    PocoNetSSLmtd.lib(PrivateKeyPassphraseHandler.obj) : error LNK2001: unresolved external symbol _pocoNetworkInitializer
    PocoNetmtd.lib(HTTPServerConnection.obj) : error LNK2001: unresolved external symbol _pocoNetworkInitializer

If I change the following it works:
Net.cpp
Line 101: const NetworkInitializer _pocoNetworkInitializer; // was pocoNetworkInitializer

Net.h
Line 131: extern "C" const struct NetworkInitializer _pocoNetworkInitializer; // was pocoNetworkInitializer

@ghost ghost assigned aleks-f Dec 26, 2012
@aleks-f
Copy link
Member

aleks-f commented Dec 26, 2012

  1. I'll take care of JSON 64 bit project files.
  2. Apparently, 64-bit does not add underscore decoration.

Here's the patch:

@@ -129,7 +129,11 @@ inline void Net_API uninitializeNetwork();
 #if defined(POCO_OS_FAMILY_WINDOWS) && !defined(POCO_NET_NO_WINDOWS_INIT)
    #if defined(POCO_STATIC)
        extern "C" const struct NetworkInitializer pocoNetworkInitializer;
-       #pragma comment(linker, "/include:_pocoNetworkInitializer")
+       #ifdef _WIN64
+           #pragma comment(linker, "/include:pocoNetworkInitializer")
+       #else
+           #pragma comment(linker, "/include:_pocoNetworkInitializer")
+       #endif
    #endif // POCO_STATIC
 #endif // POCO_NET_NO_WINDOWS_INIT

@aleks-f
Copy link
Member

aleks-f commented Dec 26, 2012

Note that VS IDE does not recognize _WIN64 but compiler does, at least in 2010. So, although #ifdef _WIN64 portion will be grayed out it is actually compiled. (UPDATE: same for VS 2008)

http://social.msdn.microsoft.com/Forums/en/vcgeneral/thread/3d75739b-6569-4496-8b45-0e0cf3b79b62

@aleks-f
Copy link
Member

aleks-f commented Dec 27, 2012

Network initialization fixed:

9f76b49

@aleks-f
Copy link
Member

aleks-f commented Dec 27, 2012

Added JSON VS100 64 bit project files:

3ace867

@aleks-f aleks-f closed this as completed Dec 27, 2012
obiltschnig pushed a commit that referenced this issue Jun 27, 2018
@spy293
Copy link

spy293 commented Aug 4, 2021

Hi aleks-f! Can you put somewhere the files compiled? I'm not sure what files to change and it would be easier for me to put the files and keep a copy somewhere...

Thank you in advice for this help! :-D

Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
None yet
Projects
None yet
Development

No branches or pull requests

3 participants