Introjucer linking problem

introjucer does not link:

Linking The Introjucer
build/intermediate/Debug/JuceLibraryCode4_6856d902.o: In function `isShmAvailable':
/home/tim/workspace/juce/extras/Introjucer/Builds/Linux/../../JuceLibraryCode/../../../amalgamation/../src/native/linux/juce_linux_Windowing.cpp:176: undefined reference to `XShmQueryVersion'
/home/tim/workspace/juce/extras/Introjucer/Builds/Linux/../../JuceLibraryCode/../../../amalgamation/../src/native/linux/juce_linux_Windowing.cpp:183: undefined reference to `XShmCreateImage'
/home/tim/workspace/juce/extras/Introjucer/Builds/Linux/../../JuceLibraryCode/../../../amalgamation/../src/native/linux/juce_linux_Windowing.cpp:197: undefined reference to `XShmAttach'
/home/tim/workspace/juce/extras/Introjucer/Builds/Linux/../../JuceLibraryCode/../../../amalgamation/../src/native/linux/juce_linux_Windowing.cpp:200: undefined reference to `XShmDetach'
build/intermediate/Debug/JuceLibraryCode4_6856d902.o: In function `XBitmapImage':
/home/tim/workspace/juce/extras/Introjucer/Builds/Linux/../../JuceLibraryCode/../../../amalgamation/../src/native/linux/juce_linux_Windowing.cpp:473: undefined reference to `XShmCreateImage'
/home/tim/workspace/juce/extras/Introjucer/Builds/Linux/../../JuceLibraryCode/../../../amalgamation/../src/native/linux/juce_linux_Windowing.cpp:492: undefined reference to `XShmAttach'
build/intermediate/Debug/JuceLibraryCode4_6856d902.o: In function `~XBitmapImage':
/home/tim/workspace/juce/extras/Introjucer/Builds/Linux/../../JuceLibraryCode/../../../amalgamation/../src/native/linux/juce_linux_Windowing.cpp:561: undefined reference to `XShmDetach'
build/intermediate/Debug/JuceLibraryCode4_6856d902.o: In function `juce::XBitmapImage::blitToWindow(unsigned long, int, int, int, int, int, int)':
/home/tim/workspace/juce/extras/Introjucer/Builds/Linux/../../JuceLibraryCode/../../../amalgamation/../src/native/linux/juce_linux_Windowing.cpp:651: undefined reference to `XShmPutImage'
build/intermediate/Debug/JuceLibraryCode4_6856d902.o: In function `juce::LinuxComponentPeer::handleWindowMessage(_XEvent*)':
/home/tim/workspace/juce/extras/Introjucer/Builds/Linux/../../JuceLibraryCode/../../../amalgamation/../src/native/linux/juce_linux_Windowing.cpp:1250: undefined reference to `XShmGetEventBase'
build/intermediate/Debug/JuceLibraryCode4_6856d902.o: In function `LinuxRepaintManager':
/home/tim/workspace/juce/extras/Introjucer/Builds/Linux/../../JuceLibraryCode/../../../amalgamation/../src/native/linux/juce_linux_Windowing.cpp:1747: undefined reference to `XShmCreateImage'
collect2: ld returned 1 exit status
make: *** [build/Introjucer] Error 1

i had to patch the makefile to link it correctly:

diff --git a/extras/Introjucer/Builds/Linux/Makefile b/extras/Introjucer/Builds/Linux/Makefile
index 3e70d93..6889d93 100644
--- a/extras/Introjucer/Builds/Linux/Makefile
+++ b/extras/Introjucer/Builds/Linux/Makefile
@@ -20,7 +20,7 @@ ifeq ($(CONFIG),Debug)
   CPPFLAGS := $(DEPFLAGS) -D "LINUX=1" -D "DEBUG=1" -D "_DEBUG=1" -D "JUCER_LINUX_MAKE_7346DA2A=1" -I "/usr/include" -I "/usr/include/freetype2"
   CFLAGS += $(CPPFLAGS) $(TARGET_ARCH) -g -ggdb -O0
   CXXFLAGS += $(CFLAGS) 
-  LDFLAGS += -L$(BINDIR) -L$(LIBDIR) -L"/usr/X11R6/lib/" -L"../../../../../juce/bin" -lfreetype -lpthread -lrt -lX11 -lGL -lGLU -lXinerama -lasound 
+  LDFLAGS += -L$(BINDIR) -L$(LIBDIR) -L"/usr/X11R6/lib/" -L"../../../../../juce/bin" -lfreetype -lpthread -lrt -lX11 -lGL -lGLU -lXinerama -lasound -lXext
   LDDEPS :=
   RESFLAGS :=  -D "LINUX=1" -D "DEBUG=1" -D "_DEBUG=1" -D "JUCER_LINUX_MAKE_7346DA2A=1" -I "/usr/include" -I "/usr/include/freetype2"
   TARGET := Introjucer

not sure, where a proper fix should go

I have no problems linking it in Ubuntu. I guess your distro must have its X libraries arranged differently… What distro are you using?

I’ve the same issue. Xext is required, if you enable the config option to use XSHM.

well this is kinda out of date, but…
…i had the same problem. solved it by using llvm/clang for the build:
just add CXX=clang++ at the top of the Makefile … well and install llvm/clang if you haven’t yet :wink: