Closed StormLord07 closed 1 year ago
Likely duplicates https://github.com/boostorg/log/issues/172.
Check if Boost was built for Windows 8 or later. I suspect, libcurl headers may define _WIN32_WINNT
(directly or indirectly) to something recent while Boost defaults to Windows 7 for your compiler.
Inconsistent target Windows versions causes mismatch in Boost.Log namespace names in the built library and your code, which causes the missing symbols. You should ensure that Boost and your code target the same Windows version.
Maybe I did something wrong but I rebuilt boost with b2 clear (or was it clean, always mess them up) b2 -a --build-type=complete define=_WIN32_WINNT=0x0A00 b2 install
now it works only after curl. I guessed wrong _WIN32_WINNT, thanks.
now it works only after curl
You need to define _WIN32_WINNT
consistently, whether or not you're including libcurl headers. Use it when you build Boost and add the same define to your project.
CMakeLists.txt
main2.cpp (minimum code to reproduce)
error
cmake logs:
Platform: Windows 10 x64 Visual Studio 17 2022 CXX compiler - MSVC 19.35.32217.1 Curl 8.2.1 built by x64 native tools for vs2022
If any more info needed i'll be happy to provide