Linux BinaryData compile issue?

Hi all!

I am trying to switch my plugin project from Projucer to cmake. I set up my CmakeLists.txt file as explained on different threads on this forum and I tried to build my plugin both on MacOs and Windows. Everything works fine on these systems.

By using the same settings, I tried to build my plugin also on Linux. I just use the same folder project and I use these cmake commands to build my plugin:

cmake -B "Builds/buildLinux"

and then

cmake --build Builds/buildLinux --config Release

What I get after this is the following error and I don’t understand its meaning and how to fix it (CutTheMoog is the name of my project)

/usr/bin/ld: libBinaryData.a(BinaryData1.cpp.o): relocation R_X86_64_PC32 against symbol `_ZN10BinaryData15CutTheMoog3_xmlE' can not be used when making a shared object; recompile with -fPIC
/usr/bin/ld: final link failed: bad value
collect2: error: ld returned 1 exit status
make[2]: *** [CMakeFiles/CutTheMoog_VST3.dir/build.make:223: CutTheMoog_artefacts/VST3/CutTheMooog.vst3/Contents/x86_64-linux/CutTheMooog.so] Error 1
make[1]: *** [CMakeFiles/Makefile2:227: CMakeFiles/CutTheMoog_VST3.dir/all] Error 2
make: *** [Makefile:130: all] Error 2

Could someone help me?
Thank you

See Loading PyTorch model using BinaryData - #2 by reuk

1 Like

Hi @mcmartin thank you very much for your reply!

I lost that thread, I will check it now!