Problem building Helloworld project in Ubuntu: undefined reference to symbol 'XShmGetEventBase'


Hello, I’m new with JUCE and I am having problems trying to build a simple ‘Hello World’ project.

I am using Ubuntu 16.04, and as export targets I have:

Linux Makefile
Code::Blocks (Linux)

If i try to build the LinuxMakefile from the command line, it complies just fine. Nevertheless, when trying to build the project using the .cdp file (Code::Blocks) I get the following error:

Build log:

-------------- Build: Debug in NewProject (compiler: GNU GCC Compiler)---------------

g++  -o bin/Debug/NewProject obj/Debug/Documents/JUCE_Projects/NewProject/JuceLibraryCode/juce_audio_basics.o obj/Debug/Documents/JUCE_Projects/NewProject/JuceLibraryCode/juce_audio_devices.o obj/Debug/Documents/JUCE_Projects/NewProject/JuceLibraryCode/juce_audio_formats.o obj/Debug/Documents/JUCE_Projects/NewProject/JuceLibraryCode/juce_audio_processors.o obj/Debug/Documents/JUCE_Projects/NewProject/JuceLibraryCode/juce_core.o obj/Debug/Documents/JUCE_Projects/NewProject/JuceLibraryCode/juce_cryptography.o obj/Debug/Documents/JUCE_Projects/NewProject/JuceLibraryCode/juce_data_structures.o obj/Debug/Documents/JUCE_Projects/NewProject/JuceLibraryCode/juce_events.o obj/Debug/Documents/JUCE_Projects/NewProject/JuceLibraryCode/juce_graphics.o obj/Debug/Documents/JUCE_Projects/NewProject/JuceLibraryCode/juce_gui_basics.o obj/Debug/Documents/JUCE_Projects/NewProject/JuceLibraryCode/juce_gui_extra.o obj/Debug/Documents/JUCE_Projects/NewProject/JuceLibraryCode/juce_opengl.o obj/Debug/Documents/JUCE_Projects/NewProject/JuceLibraryCode/juce_video.o obj/Debug/Documents/JUCE_Projects/NewProject/Source/Main.o obj/Debug/Documents/JUCE_Projects/NewProject/Source/MainComponent.o   -lGL -ldl -lpthread -lrt
/usr/bin/ld: obj/Debug/Documents/JUCE_Projects/NewProject/JuceLibraryCode/juce_gui_basics.o: undefined reference to symbol 'XShmGetEventBase'
//usr/lib/x86_64-linux-gnu/ error adding symbols: DSO missing from command line
collect2: error: ld returned 1 exit status
Process terminated with status 1 (0 minute(s), 0 second(s))
1 error(s), 0 warning(s) (0 minute(s), 0 second(s))

Build messages:

||=== Build: Debug in NewProject (compiler: GNU GCC Compiler) ===|
/usr/bin/ld: obj/Debug/Documents/JUCE_Projects/NewProject/JuceLibraryCode/juce_gui_basics.o||undefined reference to symbol 'XShmGetEventBase'|
||=== Build failed: 1 error(s), 0 warning(s) (0 minute(s), 0 second(s)) ===|

I already checked if i have installed libxext-dev, and I did, I also tried re-saving the projects from JUCE (as another post mentioned: [Linux linking errors on Ubuntu Mate] )

I just want to be able to run, compile and debug from an IDE in ubuntu, Thanks in advance for your help.

Best regards,



Are you using the latest version of the Projucer, compiled from the tip of the develop branch? We’ve recently fixed a few things in the Code::Blocks exporter which haven’t yet made it to the master branch.