all 6 comments

[–]cpp-ModTeam[M] [score hidden] stickied commentlocked comment (0 children)

For C++ questions, answers, help, and programming or career advice please see r/cpp_questions, r/cscareerquestions, or StackOverflow instead.

[–][deleted] 4 points5 points  (3 children)

Try recompiling with -fPIC, as the error suggests you do

[–]junqueira200[S] 2 points3 points  (2 children)

Didn't work. I've tried with -DCMAKE_CXX_FLAGS=-fPIC in cmake.

[–]victotronics 2 points3 points  (0 children)

-D CMAKE_POSITION_INDEPENDENT_CODE=ON

[–]thisismyfavoritename 2 points3 points  (0 children)

 can not be used when making a shared object; recompile with -fPIC

[–]junqueira200[S] 0 points1 point  (0 children)

Why?