Building VST Plugin on Linux [Solved]

Hi. I'm very new to juce (and C++ too) and I'm trying to build a VST plugin on Linux (Ubuntu).

 

I have generated a project using the Introjucer and when I want to build I go into the /builds/linux directory and run 'make' in my terminal.

At first it complained about a missing <GL/GL.h> header file. I solved that by installing the 'mesa-common-dev' package, fine.

 

Now, it can't find the VST sdk files:

 

...
...
Compiling juce_PluginUtilities.cpp
Compiling juce_video.cpp
Compiling juce_VST_Wrapper.cpp
../../../../juce/modules/juce_audio_plugin_client/VST/juce_VST_Wrapper.cpp:81:51: fatal error: public.sdk/source/vst2.x/audioeffectx.h: No such file or directory
 #include <public.sdk/source/vst2.x/audioeffectx.h>
                                                   ^
compilation terminated.
make: *** [build/intermediate/Debug/juce_VST_Wrapper_8a88968f.o] Error 1

I have downloaded the VST SDK from Steinberg and unzipped it to ~/dev/VST SDK.

 

So, I can confirm that the file "~/dev/VST SDK/public.sdk/source/vst2.x/audioeffectx.h" does in fact exist.

In the introjucer GUI app I've set the VST Folder setting (under Linux Makefile config) to "~/dev/VST3 SDK".

 

Also I have ticked the "Build VST" option in the main Project Settings.

 

What's going on here?

 

UPDATE

So, it seems that using the "~" character in the file path's don't work. I changed the VST SDK location in the project settings to an absolute path: "/home/petter/dev/VST SDK" and at least , I get a different error now, so I guess It's progress!

 

Here's what the compiler says now:

...
...
Compiling juce_video.cpp
Compiling juce_VST_Wrapper.cpp
../../../../juce/modules/juce_audio_plugin_client/VST/juce_VST_Wrapper.cpp:276:29: warning: multi-character character constant [-Wmultichar]
         setUniqueID ((int) (JucePlugin_VSTUniqueID));
                             ^
In file included from ../../../../juce/modules/juce_audio_plugin_client/VST/juce_VST_Wrapper.cpp:84:0:
/home/petter/dev/VST3 SDK/public.sdk/source/vst2.x/audioeffect.cpp: In member function ‘virtual void AudioEffect::int2string(VstInt32, char*, VstInt32)’:
/home/petter/dev/VST3 SDK/public.sdk/source/vst2.x/audioeffect.cpp:534:24: warning: narrowing conversion of ‘(((int)((char)digit)) + 48)’ from ‘int’ to ‘char’ inside { } [-Wnarrowing]
    char temp[2] = {'0' + (char)digit, '\0'};
                        ^
Compiling juce_VST3_Wrapper.cpp
Linking HelloJuce
/usr/bin/ld: cannot find -lGL
collect2: error: ld returned 1 exit status
make: *** [build/HelloJuce.so] Error 1

As I'm new to C++, I can only guess what this means. But it has "GL" in it, so my guess is that it, yet again, can't find some Open GL stuff it needs...

 

I don't have much to go with, so hopefully someone can enlighten me!

 

UPDATE #2

Think I solved it. I was missing some GL files on my system. Solved it by installing the 'libglu1-mesa-dev' package.