-
Notifications
You must be signed in to change notification settings - Fork 160
Closed
Labels
Milestone
Description
Compiling the C++ client library with Visual Studio 2017 results in no .lib being generated.
Adding set(CMAKE_WINDOWS_EXPORT_ALL_SYMBOLS ON) after line 29 in CMakeLists.txt fixes this. Requires CMake 3.4 or newer.
krpc/client/cpp/CMakeLists.txt.tmpl
Lines 29 to 38 in 70ff446
| if(MSVC) | |
| # protobuf statically links against MT, so need to compile with /MT not /MD | |
| foreach(var | |
| CMAKE_CXX_FLAGS CMAKE_CXX_FLAGS_DEBUG CMAKE_CXX_FLAGS_RELEASE | |
| CMAKE_CXX_FLAGS_MINSIZEREL CMAKE_CXX_FLAGS_RELWITHDEBINFO) | |
| if(${var} MATCHES "/MD") | |
| string(REGEX REPLACE "/MD" "/MT" ${var} "${${var}}") | |
| endif() | |
| endforeach() | |
| endif() |
Reactions are currently unavailable