juce-framework / JUCE

JUCE is an open-source cross-platform C++ application framework for desktop and mobile applications, including VST, VST3, AU, AUv3, LV2 and AAX audio plug-ins.
https://juce.com
Other
6.63k stars 1.75k forks source link

any JUCE6 CLion project that depends on juce_gui_extras fails to build on Linux #760

Closed atsushieno closed 4 years ago

atsushieno commented 4 years ago

An example project is attached.

On Linux, create a project that references juce_gui_extra, add CLion exporter, save and build it from CLion (or use cmake to build it from console).

It results in:

[ 90%] Building CXX object CMakeFiles/APP.dir/home/atsushi/Desktop/Juce6CLionOnLinuxIssue/JuceLibraryCode/include_juce_gui_extra.cpp.o
In file included from /home/atsushi/Desktop/Juce6CLionOnLinuxIssue/JuceLibraryCode/include_juce_gui_extra.cpp:8:
/home/atsushi/SDKs/JUCE/modules/juce_gui_extra/juce_gui_extra.cpp:121:11: fatal error: gtk/gtk.h: No such file or directory
  121 |  #include <gtk/gtk.h>
      |           ^~~~~~~~~~~
compilation terminated.

Confirmed on Ubuntu 20.04, x86_64.

The same project exported as LinuxMakefile just builds fine (i.e. I do have libgtk-3.0-dev installed).

Make sure you have pulled the latest commits from the develop branch of the JUCE repo and have re-compiled the Projucer before you submit your bug. Often we have already fixed the issue but it hasn't yet been released on the master branch. If it's a major bug, which must be hot-fixed immediately, then we will also accept bug reports for tagged release versions.

Confirmed with 6a01abb.

tilgwullfi commented 4 years ago

you can add those dependencies (until this is fixed) to the projucer: ( you obviously need to have pkg-config installed)

  1. open a shell and execute "pkg-config --cflags webkit2gtk-4.0"
  2. add those paths to the header search paths
  3. execute "pkg-config --libs webkit2gtk-4.0"
  4. paste the output to the extra linker flags
ed95 commented 4 years ago

This is fixed on the develop branch in https://github.com/juce-framework/JUCE/commit/6a9f9cd55061bb2e26a1e6204dd53c1b31f62ec7. You'll need to re-compile the Projucer and re-save your project.