I’m trying the CLion exporter. I’ve been using Xcode, and my project builds fine there. When I export to CLion and build I receive the error:
‘pluginterfaces/vst/vsttypes.h’ file not found.
It’s possibly the same problem timur found but I tried building from the command line and received the same error:
In file included from /Users/chrisgr/CK/JuceLibraryCode/include_juce_audio_processors.mm:9:
In file included from /Users/chrisgr/CK/Builds/CLion/../../JUCE.git/modules/juce_audio_processors/juce_audio_processors.mm:27:
In file included from /Users/chrisgr/CK/Builds/CLion/../../JUCE.git/modules/juce_audio_processors/juce_audio_processors.cpp:164:
In file included from /Users/chrisgr/CK/Builds/CLion/../../JUCE.git/modules/juce_audio_processors/format_types/juce_VST3PluginFormat.cpp:30:
/Users/chrisgr/CK/Builds/CLion/../../JUCE.git/modules/juce_audio_processors/format_types/juce_VST3Headers.h:93:11: fatal error: 'pluginterfaces/vst/vsttypes.h' file not found
#include <pluginterfaces/vst/vsttypes.h>
^~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~
I’m using Juce pulled from the dev branch as of Dec 4 using Projucer built from that version. I assume my vst library directory location is configured correctly in Projucer since the project builds in Xcode.
I got the same error building the plugin demo host in CLion. I realized that I need to set each project’s path to the VST3 SDK in that project’s exporter Settings page for Xcode. I set that for Demo Host and it built successfully.
So I looked back at my own project’s Project Settings for VST3 SDK. It was greyed and the greyed entry was not correct. I know it was correct at one time. I haven’t needed to look it since setting up the project some time ago as it was working fine. I’m surprised exports from Projucer have been building on Xcode with the wrong entry.
Anyway I entered the correct path for my project’s VST3 SDK for the Xcode exporter and now I can export to CLion and build correctly. Problem solved!
I just noticed another issue. It seems that a Projucer project’s header files are not added to the CLion project.
The cpp files are listed in the CLion project directory, but header files are not. When I try to jump to a cpp file’s header file (keyboard shortcut Ctrl+Cmd+Up) CLion reports the “header file does not belong to any project target”.
The same problem occurs with my project and with the Plugin Host example.
When you start CLion it will prompt you to “Change the project root” so that it has visibility of all your files. If you do this (usually by moving two directories higher in the tree) everything should work as expected.
There’s no (non-hacky) way of getting CLion to do this automatically from the content of CMakeLists.txt. Please add your weight to this issue: https://youtrack.jetbrains.com/issue/CPP-8644
Hi
Not sure if this has been reported, but clion/cmake does not like projectnames with spaces. so a project like “My App” would fail in clion but work in xcode/vs. Maybe the exporter could add an underscore, or remove the spaces or something?
But. Man, clion is so much better than xcode, xcode feels like coding with mittens
Hi, thanks for the response.
No my Projucer is the pre-built version from the website. And, not sure if it makes a difference, I’m not compiling plugins but standalone apps.
How can I create a release build in CLion? The CMakeLists seems to contain a release config but I don’t know where to select it in CLion. This is what it looks right now: