JUCE 6 in Ubuntu 20.04

Are there instructions for getting JUCE running/building in Ubuntu 20.04? I found some old posts from years ago that had lists of packages for older versions of Ubuntu, but nothing recent that discusses Ubuntu 20.04.

I’m attempting to follow the instructions in JUCE’s readme.md file, but running into this error:

> cmake --build cmake-build --target DemoRunner
[  0%] Building CXX object examples/DemoRunner/CMakeFiles/DemoRunner.dir/__/__/modules/juce_gui_extra/juce_gui_extra.cpp.o
/home/stephane/src/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>

I do have libgtk2.0-dev and libgtk-3-dev installed, but I’m seeing gtk.h in a different place than gtk/gtk.h:

/snap/gnome-3-34-1804/36/usr/include/gtk-2.0/gtk/gtk.h
/snap/gnome-3-34-1804/36/usr/include/gtk-3.0/gtk/gtk.h
/usr/include/gtk-2.0/gtk/gtk.h

Curious to know if there are known solutions or published instructions.

1 Like

According to this issue it has been fixed on the develop branch of juce. So you can checkout that branch and use that instead of master and it should work. Alternatively build it using the make file instead of CMake.

1 Like