Closed makc closed 7 years ago
You need to enable this flag for yor executable as well.
But how come this builds perfectly fine on mac, but not so on ubuntu, what's the difference? I did exact same thing on both, mac is fine, ubuntu -> build error.
Also, tried to do
cmake -DCMAKE_CXX_FLAGS=-fPIC ./
make assimp2json
as per this comment, but the error did not go away.
ok, yet another version here says to also specify -DCMAKE_C_FLAGS=-fPIC edit ok that does it.
If using CMake, prefer the use of CMAKE_POSITION_INDEPENDENT_CODE, instead of manually editing the flags.
I am trying to run
make assimp2json
aftercmake ./
and I get this:I was thinking where do I add that -fPIC flag, and opened flags.make, and it was already there:
What am I doing wrong? Thanks.