Repository navigation
|
When compiling under Windows, calling inline functions that refer to static data results in a linking error, how can this be fixed ? |
Answered by
BrunoLevy
Jul 26, 2026
Replies: 1 comment
|
Short answer: Longer answer: with this additional flag, Thank you @Canjia-Huang for notifying and testing. |
0 replies
Answer selected by
BrunoLevy
Sign up for free
to join this conversation on GitHub.
Already have an account?
Sign in to comment
Short answer:
add
target_compile_definitions(main PRIVATE GEO_DYNAMIC_LIBS)to the CMake configuration of your program that uses GEOGRAM.
Longer answer: with this additional flag,
GEOGRAM_APIis defined as__declspec(dllimport), which is required for static data member (but function calls can work without it, which is why you did not see the problem before).Thank you @Canjia-Huang for notifying and testing.