You signed in with another tab or window. Reload to refresh your session.You signed out in another tab or window. Reload to refresh your session.You switched accounts on another tab or window. Reload to refresh your session.Dismiss alert
When linking against a debug, static version of JsonBox, I needed to add the setting set(CMAKE_POSITION_INDEPENDENT_CODE ON) in JsonBox's CMakeLists.txt before making and installing it to my system. Otherwise, I get the linker error described in this SO question.
I'm not necessarily asking that this setting be added into JsonBox in all cases, nor am I asking that it even be added in any case; I am just bringing to light a problem I faced and making sure others are aware of it. (This is the first time I've hit this issue, but if it's a common problem, feel free to chalk it up to my ignorance 😄)
Note that for any users running into this issue, another solution (I suspect) is to add JsonBox as a target within your CMake-managed project, instead of depending on an installed version on your system. You can then add the CMAKE_POSITION_INDEPENDENT_CODE ON setting to the JsonBox target.
The text was updated successfully, but these errors were encountered:
When linking against a debug, static version of JsonBox, I needed to add the setting
set(CMAKE_POSITION_INDEPENDENT_CODE ON)
in JsonBox's CMakeLists.txt before making and installing it to my system. Otherwise, I get the linker error described in this SO question.I'm not necessarily asking that this setting be added into JsonBox in all cases, nor am I asking that it even be added in any case; I am just bringing to light a problem I faced and making sure others are aware of it. (This is the first time I've hit this issue, but if it's a common problem, feel free to chalk it up to my ignorance 😄)
Note that for any users running into this issue, another solution (I suspect) is to add JsonBox as a target within your CMake-managed project, instead of depending on an installed version on your system. You can then add the
CMAKE_POSITION_INDEPENDENT_CODE ON
setting to the JsonBox target.The text was updated successfully, but these errors were encountered: