Brand new to both Linux and CMake. Typically build plugins using Projucer on Windows and Mac, but decided it was time for CMake. Used one of the CMakeLists examples (helpful!) to modify and my VST3 plugin builds and runs in both AudioPluginHost and Reaper.
But won’t load in a program called JRiver Media Center. Contacting the manufacturer suggested that I build using -fPIC. I searched around the Juce forum and found:
set_target_properties(mypluginname PROPERTIES
POSITION_INDEPENDENT_CODE ON)
Added that to my CMakes, recompiled and won’t load in JRiver, but will in AudioPluginHost and Reaper.
Added -fPIC to VS Code as a compiler argument. And see it in the c_ccp_properties.json
file, and in the compile_commands.json
, but after compiling still won’t load in JRiver (with no error message).
I must be missing something?
Ubuntu 20.04.5 LTS, Visual Studio Code 1.73.1 with C++ and CMake extensions.
Juce 7.0.2, GCC 9.4.0 x86_64-linux-gnu
When first opening up VS Code:
[variant] Loaded new set of variants
[kit] Successfully loaded 2 kits from /home/mitch/.local/share/CMakeTools/cmake-tools-kits.json
[proc] Executing command: /usr/bin/gcc -v
[proc] The command: ninja --version failed with error: Error: spawn ninja ENOENT
[proc] The command: ninja-build --version failed with error: Error: spawn ninja-build ENOENT
[cmakefileapi-driver] This version of CMake does not support the "toolchains" object kind. Compiler paths will be determined by reading CMakeCache.txt.
[main] Configuring folder: MConvolve
[proc] Executing command: /usr/bin/cmake --no-warn-unused-cli -DCMAKE_EXPORT_COMPILE_COMMANDS:BOOL=TRUE -DCMAKE_BUILD_TYPE:STRING=Debug -DCMAKE_C_COMPILER:FILEPATH=/usr/bin/gcc -DCMAKE_CXX_COMPILER:FILEPATH=/usr/bin/g++ -S/home/mitch/Documents/MConvolve -B/home/mitch/Documents/MConvolve/build -G "Unix Makefiles"
[cmake] Not searching for unused variables given on the command line.
[cmake] -- Configuring juceaide
[cmake] -- Building juceaide
[cmake] -- Exporting juceaide
[cmake] -- Configuring done
[cmake] -- Generating done
[cmake] -- Build files have been written to: /home/mitch/Documents/MConvolve/build
Builds successfully, here is the last bit
build] [ 83%] Linking CXX static library HLConvolver_artefacts/Debug/libHLConvolver_SharedCode.a
[build] [ 83%] Built target HLConvolver
[build] [ 87%] Building CXX object CMakeFiles/HLConvolver_VST3.dir/home/mitch/Documents/JUCE/modules/juce_audio_plugin_client/juce_audio_plugin_client_ARA.cpp.o
[build] [ 87%] Building CXX object CMakeFiles/HLConvolver_VST3.dir/home/mitch/Documents/JUCE/modules/juce_audio_plugin_client/juce_audio_plugin_client_LV2.cpp.o
[build] [ 89%] Building CXX object CMakeFiles/HLConvolver_VST3.dir/home/mitch/Documents/JUCE/modules/juce_audio_plugin_client/juce_audio_plugin_client_AAX.cpp.o
[build] [ 91%] Building CXX object CMakeFiles/HLConvolver_VST3.dir/home/mitch/Documents/JUCE/modules/juce_audio_plugin_client/juce_audio_plugin_client_Standalone.cpp.o
[build] [ 93%] Building CXX object CMakeFiles/HLConvolver_VST3.dir/home/mitch/Documents/JUCE/modules/juce_audio_plugin_client/juce_audio_plugin_client_Unity.cpp.o
[build] [ 95%] Building CXX object CMakeFiles/HLConvolver_VST3.dir/home/mitch/Documents/JUCE/modules/juce_audio_plugin_client/juce_audio_plugin_client_VST2.cpp.o
[build] [ 97%] Building CXX object CMakeFiles/HLConvolver_VST3.dir/home/mitch/Documents/JUCE/modules/juce_audio_plugin_client/juce_audio_plugin_client_VST3.cpp.o
[build] [100%] Linking CXX shared module HLConvolver_artefacts/Debug/VST3/HLConvolver.vst3/Contents/x86_64-linux/HLConvolver.so
[build] -- Up-to-date: /home/mitch/.vst3/HLConvolver.vst3
[build] -- Up-to-date: /home/mitch/.vst3/HLConvolver.vst3/Contents
[build] -- Up-to-date: /home/mitch/.vst3/HLConvolver.vst3/Contents/x86_64-linux
[build] -- Installing: /home/mitch/.vst3/HLConvolver.vst3/Contents/x86_64-linux/HLConvolver.so
[build] [100%] Built target HLConvolver_VST3
[build] Build finished with exit code 0
Loads in AudioPluginHost and Reaper, but not JRiver. JRiver dev showed me another VST3 that loads…
Thoughts?