pocoproject / poco

The POCO C++ Libraries are powerful cross-platform C++ libraries for building network- and internet-based applications that run on desktop, server, mobile, IoT, and embedded systems.
https://pocoproject.org
Other
8.04k stars 2.11k forks source link

Building on Windows and Integrating to UE5 gives PocoFoundation.lib error #4570

Closed ffreality closed 1 month ago

ffreality commented 1 month ago

I am trying to integrate POCO to Unreal Engine 5 on Windows 11 (Windows 10 and 11 SDKs are installed with VS2022)

My cmake configurations are like this

cmake ../.. -G "Visual Studio 17 2022" -A x64 
-DENABLE_REDIS:BOOL="0" 
-DCMAKE_MINSIZEREL_POSTFIX:STRING="md" 
-DSSL_EAY_RELEASE:FILEPATH="D:/Epic/SDKs/UE_5.4/Engine/Source/ThirdParty/OpenSSL/1.1.1t/lib/Win64/VS2015/Release/libssl.lib" 
-DLIB_EAY_RELEASE:FILEPATH="D:/Epic/SDKs/UE_5.4/Engine/Source/ThirdParty/OpenSSL/1.1.1t/lib/Win64/VS2015/Release/libcrypto.lib" 
-DOPENSSL_APPLINK_SOURCE:FILEPATH="D:/Epic/Projects/FROZEN/SDKs/FF_Plugins/Plugins/FF_OpenSSL/Source/FF_OpenSSL/ThirdParty/openssl/Win64/applink.c" -DSTATIC_POSTFIX:STRING="md" 
-DOPENSSL_INCLUDE_DIR:PATH="D:/Epic/SDKs/UE_5.4/Engine/Source/ThirdParty/OpenSSL/1.1.1t/include/Win64/VS2015" 
-DCMAKE_RELWITHDEBINFO_POSTFIX:STRING="" 
-DBUILD_SHARED_LIBS:BOOL="0" 
-DCMAKE_RELEASE_POSTFIX:STRING="" 
-DENABLE_DATA_SQLITE:BOOL="0" 
-DENABLE_MONGODB:BOOL="0" 

I integrated library and includes with UnrealBuildTool but UE5 gives me this error. 1>LINK : fatal error LNK1104: cannot open file 'PocoFoundation.lib'

Problem is there is no PocoFoundation.lib at all. I have PocoFoundationmd.lib. I tried to use /MT build but it didn't even pass the Poco.sln build.

Any suggestion ?

ffreality commented 1 month ago

Any suggestion ?

matejk commented 1 month ago

Which version of Poco?

Do you get this error when building Poco?

ffreality commented 1 month ago

Which version of Poco?

Do you get this error when building Poco?

Current master version

ffreality commented 1 month ago

Okay solved the problem. Building as static library cause this. I built it as shared library and set enabled only these

I can create a simple HTTP server with it.