0

When building, linker throws this error:

Error:

error: /home/m3/repos/editor/editorlib/src/clipper/build//libclipper.a(clipper.cpp.o): relocation R_X86_64_PC32 against symbol `_ZNKSt6vectorIN10ClipperLib8PolyNodeESaIS1_EE4sizeEv' can not be used when making a shared object; recompile with -fPIC

I have built the libclipper.a by these commands:

cd editorlib/src/clipper
mkdir build
cd build/
cmake ..
cmake --build . --config Debug
cmake --build . --config Release

Tried

One possibility was that the Debug-Release mismatch, but as far as I checked, that as not a problem.

What could be the cause?

Megidd
  • 7,089
  • 6
  • 65
  • 142

1 Answers1

0

The error cause might be this. It got resolved by:

cmake -DCMAKE_POSITION_INDEPENDENT_CODE=ON ..

As suggested here.

Megidd
  • 7,089
  • 6
  • 65
  • 142