problems linking GLee, gstappsink, RtAudio in linux64

Hey, I’m trying to build an app that plays video in 64-bit linux. Using 0062. My build setup is a bit different from the vanilla oF distro. I get the following undefined references for GLee, gst app sink, and RtAudio. But I am definitely linking with the provided linux64 libRtAudio.a, liboFappsink.a, and libGLee.a. libopenFrameworks.a is built with the provided makefile.

Any ideas why this is happening?

  
davidst@davidst-xubuntu64:~/Desktop/Table/prj$ ./buildAndRun.sh   
==== Building Table ====  
Linking Table  
../../Common/openFrameworks0062/libs/openFrameworksCompiled/lib/linux64/libopenFrameworks.a(ofAppRunner.o): In function `ofSetVerticalSync(bool)':  
ofAppRunner.cpp:(.text+0x234): undefined reference to `_GLEE_GLX_SGI_swap_control'  
ofAppRunner.cpp:(.text+0x239): undefined reference to `GLeeEnabled'  
ofAppRunner.cpp:(.text+0x247): undefined reference to `pglXSwapIntervalSGI'  
../../Common/openFrameworks0062/libs/openFrameworksCompiled/lib/linux64/libopenFrameworks.a(ofGraphics.o): In function `ofSetMinMagFilters(float, float)':  
ofGraphics.cpp:(.text+0xb94): undefined reference to `_GLEE_ARB_texture_rectangle'  
ofGraphics.cpp:(.text+0xb99): undefined reference to `GLeeEnabled'  
../../Common/openFrameworks0062/libs/openFrameworksCompiled/lib/linux64/libopenFrameworks.a(ofGraphics.o): In function `ofSetTextureWrap(float, float)':  
ofGraphics.cpp:(.text+0xc14): undefined reference to `_GLEE_ARB_texture_rectangle'  
ofGraphics.cpp:(.text+0xc19): undefined reference to `GLeeEnabled'  
../../Common/openFrameworks0062/libs/openFrameworksCompiled/lib/linux64/libopenFrameworks.a(ofTexture.o): In function `ofTexture::allocate(int, int, int, bool)':  
ofTexture.cpp:(.text+0x1081): undefined reference to `_GLEE_ARB_texture_rectangle'  
ofTexture.cpp:(.text+0x1086): undefined reference to `GLeeEnabled'  
../../Common/openFrameworks0062/libs/openFrameworksCompiled/lib/linux64/libopenFrameworks.a(ofGstUtils.o): In function `on_new_buffer_from_source(_GstAppSink*, void*)':  
ofGstUtils.cpp:(.text+0x773): undefined reference to `gst_app_sink_get_type'  
ofGstUtils.cpp:(.text+0x786): undefined reference to `gst_app_sink_pull_buffer'  
../../Common/openFrameworks0062/libs/openFrameworksCompiled/lib/linux64/libopenFrameworks.a(ofGstUtils.o): In function `on_new_preroll_from_source(_GstAppSink*, void*)':  
ofGstUtils.cpp:(.text+0x803): undefined reference to `gst_app_sink_get_type'  
ofGstUtils.cpp:(.text+0x816): undefined reference to `gst_app_sink_pull_preroll'  
../../Common/openFrameworks0062/libs/openFrameworksCompiled/lib/linux64/libopenFrameworks.a(ofGstUtils.o): In function `appsink_plugin_init(_GstPlugin*)':  
ofGstUtils.cpp:(.text+0xd05): undefined reference to `gst_app_sink_get_type'  
../../Common/openFrameworks0062/libs/openFrameworksCompiled/lib/linux64/libopenFrameworks.a(ofGstUtils.o): In function `ofGstUtils::startPipeline()':  
ofGstUtils.cpp:(.text+0xf2d): undefined reference to `gst_app_sink_get_type'  
ofGstUtils.cpp:(.text+0xf4f): undefined reference to `gst_app_sink_set_callbacks'  
../../Common/openFrameworks0062/libs/openFrameworksCompiled/lib/linux64/libopenFrameworks.a(ofGstUtils.o): In function `ofGstUtils::loadMovie(std::basic_string<char, std::char_traits<char>, std::allocator<char> >)':  
ofGstUtils.cpp:(.text+0x22a5): undefined reference to `gst_app_sink_get_type'  
ofGstUtils.cpp:(.text+0x22bf): undefined reference to `gst_app_sink_set_caps'  
../../Common/openFrameworks0062/libs/openFrameworksCompiled/lib/linux64/libopenFrameworks.a(ofGstUtils.o): In function `ofGstUtils::update()':  
ofGstUtils.cpp:(.text+0x2b8b): undefined reference to `gst_app_sink_get_type'  
ofGstUtils.cpp:(.text+0x2ba2): undefined reference to `gst_app_sink_pull_preroll'  
ofGstUtils.cpp:(.text+0x2bf1): undefined reference to `gst_app_sink_get_type'  
ofGstUtils.cpp:(.text+0x2c08): undefined reference to `gst_app_sink_pull_buffer'  
../../Common/openFrameworks0062/libs/openFrameworksCompiled/lib/linux64/libopenFrameworks.a(ofSoundStream.o): In function `ofSoundStreamClose()':  
ofSoundStream.cpp:(.text+0x106): undefined reference to `RtAudio::~RtAudio()'  
../../Common/openFrameworks0062/libs/openFrameworksCompiled/lib/linux64/libopenFrameworks.a(ofSoundStream.o): In function `ofSoundStreamSetup(int, int, ofBaseApp*, int, int, int)':  
ofSoundStream.cpp:(.text+0x1c4): undefined reference to `RtAudio::RtAudio(RtAudio::Api)'  
ofSoundStream.cpp:(.text+0x2bf): undefined reference to `RtAudio::openStream(RtAudio::StreamParameters*, RtAudio::StreamParameters*, unsigned long, unsigned int, unsigned int*, int (*)(void*, void*, unsigned int, double, unsigned int, void*), void*, RtAudio::StreamOptions*)'  
../../Common/openFrameworks0062/libs/openFrameworksCompiled/lib/linux64/libopenFrameworks.a(ofSoundStream.o): In function `ofSoundStreamListDevices()':  
ofSoundStream.cpp:(.text+0x444): undefined reference to `RtAudio::RtAudio(RtAudio::Api)'  
ofSoundStream.cpp:(.text+0x6b8): undefined reference to `RtAudio::~RtAudio()'  
collect2: ld returned 1 exit status  
make[1]: *** [../bin/Table] Error 1  
make: *** [Table] Error 2  
./buildAndRun.sh: Build failed  

ah, making some progress. openFrameworks needs to appear before the other libs on the command line apparently… but why grrr…

hey!

the problem is in linux when a library depends on another it needs to appear before the ones it depends. so since OF lib depends on glee, rtaudio… it needs to appear first

crazy. i knew that once and forgot. now i know again, but i’ll surely forget again. anyway i ditched the custom build because unpredictable crashes were happening… maybe some kind of library version clashes…