Juce is not compiles in Ubuntu10


#1

Hey there! I’ve git’tting from repository the last version of Juce, try to compile but it failed.
I have just compiled the same version on the Windows but I want to work in Linux.
so… help me anybody=) What’s wrong?
OS: Linux Ubuntu 10.04 with freetype2

Regards

Compiling juce_linux_NativeCode.cpp
In file included from ../../src/native/juce_linux_NativeCode.cpp:37:
../../src/native/linux/juce_linux_NativeIncludes.h:79:38: warning: X11/extensions/Xinerama.h: No such file or directory
../../src/native/linux/juce_linux_NativeIncludes.h:83:34: warning: X11/extensions/XShm.h: No such file or directory
../../src/native/linux/juce_linux_NativeIncludes.h:96:34: warning: X11/Xcursor/Xcursor.h: No such file or directory
In file included from ../../src/native/juce_linux_NativeCode.cpp:106:
../../src/native/linux/juce_linux_Windowing.cpp: In function ‘bool juce::XSHMHelpers::isShmAvailable()’:
../../src/native/linux/juce_linux_Windowing.cpp:176: error: ‘XShmQueryVersion’ was not declared in this scope
../../src/native/linux/juce_linux_Windowing.cpp:181: error: ‘XShmSegmentInfo’ was not declared in this scope
../../src/native/linux/juce_linux_Windowing.cpp:181: error: expected ‘;’ before ‘segmentInfo’
../../src/native/linux/juce_linux_Windowing.cpp:182: error: ‘segmentInfo’ was not declared in this scope
../../src/native/linux/juce_linux_Windowing.cpp:184: error: ‘XShmCreateImage’ was not declared in this scope
../../src/native/linux/juce_linux_Windowing.cpp:198: error: ‘XShmAttach’ was not declared in this scope
../../src/native/linux/juce_linux_Windowing.cpp:201: error: ‘XShmDetach’ was not declared in this scope
In file included from ../../src/native/juce_linux_NativeCode.cpp:106:
../../src/native/linux/juce_linux_Windowing.cpp: At global scope:
../../src/native/linux/juce_linux_Windowing.cpp:665: error: ‘XShmSegmentInfo’ does not name a type
../../src/native/linux/juce_linux_Windowing.cpp: In constructor ‘juce::XBitmapImage::XBitmapImage(juce::Image::PixelFormat, int, int, bool, int, Visual*)’:
../../src/native/linux/juce_linux_Windowing.cpp:468: error: ‘segmentInfo’ was not declared in this scope
../../src/native/linux/juce_linux_Windowing.cpp:474: error: ‘XShmCreateImage’ was not declared in this scope
../../src/native/linux/juce_linux_Windowing.cpp:493: error: ‘XShmAttach’ was not declared in this scope
../../src/native/linux/juce_linux_Windowing.cpp: In destructor ‘virtual juce::XBitmapImage::~XBitmapImage()’:
../../src/native/linux/juce_linux_Windowing.cpp:565: error: ‘segmentInfo’ was not declared in this scope
../../src/native/linux/juce_linux_Windowing.cpp:565: error: ‘XShmDetach’ was not declared in this scope
../../src/native/linux/juce_linux_Windowing.cpp: In member function ‘void juce::XBitmapImage::blitToWindow(Window, int, int, int, int, int, int)’:
../../src/native/linux/juce_linux_Windowing.cpp:647: error: ‘XShmPutImage’ was not declared in this scope
../../src/native/linux/juce_linux_Windowing.cpp: In member function ‘void juce::LinuxComponentPeer::handleWindowMessage(XEvent*)’:
../../src/native/linux/juce_linux_Windowing.cpp:1693: error: ‘XShmGetEventBase’ was not declared in this scope
../../src/native/linux/juce_linux_Windowing.cpp: In constructor ‘juce::LinuxComponentPeer::LinuxRepaintManager::LinuxRepaintManager(juce::LinuxComponentPeer*)’:
../../src/native/linux/juce_linux_Windowing.cpp:1792: error: ‘XShmSegmentInfo’ was not declared in this scope
../../src/native/linux/juce_linux_Windowing.cpp:1792: error: expected ‘;’ before ‘segmentinfo’
../../src/native/linux/juce_linux_Windowing.cpp:1796: error: ‘segmentinfo’ was not declared in this scope
../../src/native/linux/juce_linux_Windowing.cpp:1796: error: ‘XShmCreateImage’ was not declared in this scope
../../src/native/linux/juce_linux_Windowing.cpp: In function ‘void juce::juce_updateMultiMonitorInfo(juce::Array<juce::Rectangle<int>, juce::DummyCriticalSection>&, bool)’:
../../src/native/linux/juce_linux_Windowing.cpp:2770: error: expected initializer before ‘*’ token
../../src/native/linux/juce_linux_Windowing.cpp:2773: error: ‘tXineramaQueryScreens’ does not name a type
../../src/native/linux/juce_linux_Windowing.cpp:2775: error: ‘xXineramaQueryScreens’ was not declared in this scope
../../src/native/linux/juce_linux_Windowing.cpp:2785: error: ‘tXineramaQueryScreens’ was not declared in this scope
../../src/native/linux/juce_linux_Windowing.cpp:2785: error: expected ‘;’ before ‘dlsym’
../../src/native/linux/juce_linux_Windowing.cpp:2790: error: ‘xXineramaQueryScreens’ was not declared in this scope
../../src/native/linux/juce_linux_Windowing.cpp:2794: error: ‘XineramaScreenInfo’ was not declared in this scope
../../src/native/linux/juce_linux_Windowing.cpp:2794: error: expected primary-expression before ‘const’
../../src/native/linux/juce_linux_Windowing.cpp:2794: error: expected ‘;’ before ‘const’
../../src/native/linux/juce_linux_Windowing.cpp:2796: error: ‘screens’ was not declared in this scope
../../src/native/linux/juce_linux_Windowing.cpp: In static member function ‘static void* juce::MouseCursor::createMouseCursorFromImage(const juce::Image&, int, int)’:
../../src/native/linux/juce_linux_Windowing.cpp:2943: error: ISO C++ forbids declaration of ‘XcursorBool’ with no type
../../src/native/linux/juce_linux_Windowing.cpp:2943: error: typedef ‘XcursorBool’ is initialized (use decltype instead)
../../src/native/linux/juce_linux_Windowing.cpp:2943: error: ‘tXcursorSupportsARGB’ was not declared in this scope
../../src/native/linux/juce_linux_Windowing.cpp:2944: error: expected initializer before ‘*’ token
../../src/native/linux/juce_linux_Windowing.cpp:2945: error: typedef ‘tXcursorImageDestroy’ is initialized (use decltype instead)
../../src/native/linux/juce_linux_Windowing.cpp:2945: error: ‘XcursorImage’ was not declared in this scope
../../src/native/linux/juce_linux_Windowing.cpp:2945: error: expected primary-expression before ‘)’ token
../../src/native/linux/juce_linux_Windowing.cpp:2946: error: ISO C++ forbids declaration of ‘XcursorImage’ with no type
../../src/native/linux/juce_linux_Windowing.cpp:2946: error: expected ‘,’ or ‘...’ before ‘*’ token
../../src/native/linux/juce_linux_Windowing.cpp:2948: error: ‘tXcursorSupportsARGB’ does not name a type
../../src/native/linux/juce_linux_Windowing.cpp:2949: error: ‘tXcursorImageCreate’ does not name a type
../../src/native/linux/juce_linux_Windowing.cpp:2950: error: ‘tXcursorImageDestroy’ does not name a type
../../src/native/linux/juce_linux_Windowing.cpp:2961: error: ‘xXcursorSupportsARGB’ was not declared in this scope
../../src/native/linux/juce_linux_Windowing.cpp:2961: error: expected ‘;’ before ‘dlsym’
../../src/native/linux/juce_linux_Windowing.cpp:2962: error: ‘xXcursorImageCreate’ was not declared in this scope
../../src/native/linux/juce_linux_Windowing.cpp:2962: error: ‘tXcursorImageCreate’ was not declared in this scope
../../src/native/linux/juce_linux_Windowing.cpp:2962: error: expected ‘;’ before ‘dlsym’
../../src/native/linux/juce_linux_Windowing.cpp:2964: error: ‘xXcursorImageDestroy’ was not declared in this scope
../../src/native/linux/juce_linux_Windowing.cpp:2964: error: ‘tXcursorImageDestroy’ was not declared in this scope
../../src/native/linux/juce_linux_Windowing.cpp:2964: error: expected ‘;’ before ‘dlsym’
../../src/native/linux/juce_linux_Windowing.cpp:2973: error: ‘xXcursorSupportsARGB’ was not declared in this scope
../../src/native/linux/juce_linux_Windowing.cpp:2975: error: ‘xcImage’ was not declared in this scope
../../src/native/linux/juce_linux_Windowing.cpp:2975: error: ‘xXcursorImageCreate’ was not declared in this scope
../../src/native/linux/juce_linux_Windowing.cpp:2981: error: ‘XcursorPixel’ was not declared in this scope
../../src/native/linux/juce_linux_Windowing.cpp:2981: error: ‘dest’ was not declared in this scope
../../src/native/linux/juce_linux_Windowing.cpp:2988: error: ‘xXcursorImageDestroy’ was not declared in this scope
make: *** [build/intermediate/Debug/juce_linux_NativeCode_b464a4a9.o] Error 1

#2

Some of the libraries needed by juce don’t come with Ubuntu by default and you have to download them separately. See juce’s readme for more info (in the ‘docs’ subfolder of your juce folder)


#3

I go to a lot of trouble to put comments above include statements if there’s a chance they might not be found on all machines, so that if anyone hits an include error, they can instantly read an explanation, and how to fix it.

In this case, if you’d actually looked at the code, you’d have seen this:

#if JUCE_USE_XINERAMA /* If you're trying to use Xinerama, you'll need to install the "libxinerama-dev" package.. */ #include <X11/extensions/Xinerama.h> #endif

In my crazy old-fashioned way, I’ve always assumed that the obvious first thing anyone will do when they see an error is to actually go and look at that line of code… But since you’re the second person this week to post almost the exact same question, I guess that’s not the way people think any more!


#4

mmm… Thanks fellows, I’ve compiled the JUCE but now Jucer not wants to link:

Linking The Jucer
/usr/bin/ld: cannot find -lGLU
collect2: ld returned 1 exit status
make: *** [build/Jucer] Error 1

What’s this?

Regards


#5

the GLU library is part of openGL. You can either install it, or turn off the JUCE_OPENGL flag.


#6

I have installed the package ’ libsdl1.2-dev '. It have linked!=)