It's not possible to build rlottie with static linking on Windows when compiled using MinGW.
There is a minor issue in the CMakeLists.txt file where the following lines makes the configuration fail:
if (WIN32 AND NOT BUILD_SHARED_LIBS)
target_compile_definitions(rlottie PUBLIC -DRLOTTIE_BUILD=0)
set(CMAKE_CXX_FLAGS_RELEASE "${CMAKE_CXX_FLAGS_RELEASE} /MT")
set(CMAKE_CXX_FLAGS_DEBUG "${CMAKE_CXX_FLAGS_DEBUG} /MTd")
endif()
These are MSVC flags and MinGW of course can't interpret them as it needs GCC-style compiler flags.
This is a minor thing though, more serious is that there are multiple linker issues when linking against librlottie.a
The issue is present on the master branch (latest commit 875626965959d8e269ca22175c8e1ad190696c43).
Hi!
It's not possible to build rlottie with static linking on Windows when compiled using MinGW.
There is a minor issue in the CMakeLists.txt file where the following lines makes the configuration fail: if (WIN32 AND NOT BUILD_SHARED_LIBS) target_compile_definitions(rlottie PUBLIC -DRLOTTIE_BUILD=0) set(CMAKE_CXX_FLAGS_RELEASE "${CMAKE_CXX_FLAGS_RELEASE} /MT") set(CMAKE_CXX_FLAGS_DEBUG "${CMAKE_CXX_FLAGS_DEBUG} /MTd") endif()
These are MSVC flags and MinGW of course can't interpret them as it needs GCC-style compiler flags.
This is a minor thing though, more serious is that there are multiple linker issues when linking against librlottie.a The issue is present on the master branch (latest commit 875626965959d8e269ca22175c8e1ad190696c43).
I'm attaching an output of the errors: MinGW_linking_errors.txt
Many thanks in advance!