undefined reference to `__glewActiveTexture' (oF 007)

Hi all,

trying to build an app under Ubuntu 11.04 64bits, using oF 007, I got the following errors when trying to compile. This app was originally made in version 0062 (so I had to change ofxVec2f to ofVec2f). I now solved this issue (see below). So this post is for reference, if someone else has this issue.

  
../../../libs/openFrameworksCompiled/lib/linux64/libopenFrameworksDebug.a(ofTexture.o)||In function `ofTexture::draw(float, float, float, float, float)':|  
/home/menno/Downloads/of_preRelease_v007_linux64/libs/openFrameworksCompiled/project/linux64/../../../openFrameworks/gl/ofTexture.cpp|828|undefined reference to `__glewActiveTexture'|  
../../../libs/openFrameworksCompiled/lib/linux64/libopenFrameworksDebug.a(ofTexture.o)||In function `ofTexture::draw(ofVec3f, ofVec3f, ofVec3f, ofVec3f)':|  
/home/menno/Downloads/of_preRelease_v007_linux64/libs/openFrameworksCompiled/project/linux64/../../../openFrameworks/gl/ofTexture.cpp|940|undefined reference to `__glewActiveTexture'|  
../../../libs/openFrameworksCompiled/lib/linux64/libopenFrameworksDebug.a(ofAppRunner.o)||In function `ofSetupOpenGL(ofPtr<ofAppBaseWindow>, int, int, int)':|  
/home/menno/Downloads/of_preRelease_v007_linux64/libs/openFrameworksCompiled/project/linux64/../../../openFrameworks/app/ofAppRunner.cpp|96|undefined reference to `glewExperimental'|  
/home/menno/Downloads/of_preRelease_v007_linux64/libs/openFrameworksCompiled/project/linux64/../../../openFrameworks/app/ofAppRunner.cpp|97|undefined reference to `glewInit'|  
/home/menno/Downloads/of_preRelease_v007_linux64/libs/openFrameworksCompiled/project/linux64/../../../openFrameworks/app/ofAppRunner.cpp|101|undefined reference to `glewGetErrorString'|  
../../../libs/openFrameworksCompiled/lib/linux64/libopenFrameworksDebug.a(ofGLRenderer.o)||In function `ofGLRenderer::setBlendMode(ofBlendMode)':|  
/home/menno/Downloads/of_preRelease_v007_linux64/libs/openFrameworksCompiled/project/linux64/../../../openFrameworks/gl/ofGLRenderer.cpp|708|undefined reference to `__glewBlendEquation'|  
/home/menno/Downloads/of_preRelease_v007_linux64/libs/openFrameworksCompiled/project/linux64/../../../openFrameworks/gl/ofGLRenderer.cpp|717|undefined reference to `__glewBlendEquation'|  
/home/menno/Downloads/of_preRelease_v007_linux64/libs/openFrameworksCompiled/project/linux64/../../../openFrameworks/gl/ofGLRenderer.cpp|726|undefined reference to `__glewBlendEquation'|  
/home/menno/Downloads/of_preRelease_v007_linux64/libs/openFrameworksCompiled/project/linux64/../../../openFrameworks/gl/ofGLRenderer.cpp|735|undefined reference to `__glewBlendEquation'|  
/home/menno/Downloads/of_preRelease_v007_linux64/libs/openFrameworksCompiled/project/linux64/../../../openFrameworks/gl/ofGLRenderer.cpp|744|undefined reference to `__glewBlendEquation'|  
||=== Build finished: 10 errors, 0 warnings ===|  
  

I was not sure what to make of this.
I then tryed the ubuntu codeblocks install script, which told me Codeblocks is already latest version.
Then ran the install_dependencies.sh script, which to my discontent removed packeges ardour, jack and qjackctl (which I use) to install libjack instead.
However, the compilation steps of this script did create files that allow me to build the project.
Then, I installed ardour and jack again, which removed libjack-dev, but there is no error.
Happy end.

Follow-up of the previous post.
The end was not so happy. Installing ardour of qjackctl, which removes packeges libjack-dev and libjack0, breaks the build and gives the same errors back.
This makes me really unhappy because I like ardour and I use qjackctl a lot.
So, hopefully this will somehow change in a future build of oF?

mmh, weird i’d thought that jack actually depended on libjack, will take a look. to solve it you can try with rtAudio, edit ofConstants.h and change line 223:

  
  
#ifdef TARGET_LINUX  
		#define OF_SOUNDSTREAM_PORTAUDIO  
  

with:

  
  
#ifdef TARGET_LINUX  
		#define OF_SOUNDSTREAM_RTAUDIO  
  

since rtAudio doesn’t depend on libjack it should work without problem even uninstalling it

Tried that, after installing Ardour again, Codeblocks compiles many things (everything?) anew, then gives the errors below, which include the ones from before, and also other ones.

  
  
||=== libopenFrameworks, Debug ===|  
15 warnings... and then:  
../../../libs/openFrameworksCompiled/lib/linux64/libopenFrameworksDebug.a(ofTexture.o)||In function `ofTexture::draw(float, float, float, float, float)':|  
/home/menno/Downloads/of_preRelease_v007_linux64/libs/openFrameworksCompiled/project/linux64/../../../openFrameworks/gl/ofTexture.cpp|828|undefined reference to `__glewActiveTexture'|  
../../../libs/openFrameworksCompiled/lib/linux64/libopenFrameworksDebug.a(ofTexture.o)||In function `ofTexture::draw(ofVec3f, ofVec3f, ofVec3f, ofVec3f)':|  
/home/menno/Downloads/of_preRelease_v007_linux64/libs/openFrameworksCompiled/project/linux64/../../../openFrameworks/gl/ofTexture.cpp|940|undefined reference to `__glewActiveTexture'|  
../../../libs/openFrameworksCompiled/lib/linux64/libopenFrameworksDebug.a(ofAppRunner.o)||In function `ofSetupOpenGL(ofPtr<ofAppBaseWindow>, int, int, int)':|  
/home/menno/Downloads/of_preRelease_v007_linux64/libs/openFrameworksCompiled/project/linux64/../../../openFrameworks/app/ofAppRunner.cpp|96|undefined reference to `glewExperimental'|  
/home/menno/Downloads/of_preRelease_v007_linux64/libs/openFrameworksCompiled/project/linux64/../../../openFrameworks/app/ofAppRunner.cpp|97|undefined reference to `glewInit'|  
/home/menno/Downloads/of_preRelease_v007_linux64/libs/openFrameworksCompiled/project/linux64/../../../openFrameworks/app/ofAppRunner.cpp|101|undefined reference to `glewGetErrorString'|  
../../../libs/openFrameworksCompiled/lib/linux64/libopenFrameworksDebug.a(ofGLRenderer.o)||In function `ofGLRenderer::setBlendMode(ofBlendMode)':|  
/home/menno/Downloads/of_preRelease_v007_linux64/libs/openFrameworksCompiled/project/linux64/../../../openFrameworks/gl/ofGLRenderer.cpp|708|undefined reference to `__glewBlendEquation'|  
/home/menno/Downloads/of_preRelease_v007_linux64/libs/openFrameworksCompiled/project/linux64/../../../openFrameworks/gl/ofGLRenderer.cpp|717|undefined reference to `__glewBlendEquation'|  
/home/menno/Downloads/of_preRelease_v007_linux64/libs/openFrameworksCompiled/project/linux64/../../../openFrameworks/gl/ofGLRenderer.cpp|726|undefined reference to `__glewBlendEquation'|  
/home/menno/Downloads/of_preRelease_v007_linux64/libs/openFrameworksCompiled/project/linux64/../../../openFrameworks/gl/ofGLRenderer.cpp|735|undefined reference to `__glewBlendEquation'|  
/home/menno/Downloads/of_preRelease_v007_linux64/libs/openFrameworksCompiled/project/linux64/../../../openFrameworks/gl/ofGLRenderer.cpp|744|undefined reference to `__glewBlendEquation'|  
../../../libs/openFrameworksCompiled/lib/linux64/libopenFrameworksDebug.a(ofGstVideoGrabber.o)||In function `get_video_devices':|  
/home/menno/Downloads/of_preRelease_v007_linux64/libs/openFrameworksCompiled/project/linux64/../../../openFrameworks/video/ofGstVideoGrabber.cpp|63|undefined reference to `udev_new'|  
/home/menno/Downloads/of_preRelease_v007_linux64/libs/openFrameworksCompiled/project/linux64/../../../openFrameworks/video/ofGstVideoGrabber.cpp|64|undefined reference to `udev_enumerate_new'|  
/home/menno/Downloads/of_preRelease_v007_linux64/libs/openFrameworksCompiled/project/linux64/../../../openFrameworks/video/ofGstVideoGrabber.cpp|65|undefined reference to `udev_enumerate_scan_devices'|  
/home/menno/Downloads/of_preRelease_v007_linux64/libs/openFrameworksCompiled/project/linux64/../../../openFrameworks/video/ofGstVideoGrabber.cpp|66|undefined reference to `udev_enumerate_get_list_entry'|  
/home/menno/Downloads/of_preRelease_v007_linux64/libs/openFrameworksCompiled/project/linux64/../../../openFrameworks/video/ofGstVideoGrabber.cpp|81|undefined reference to `udev_list_entry_get_name'|  
/home/menno/Downloads/of_preRelease_v007_linux64/libs/openFrameworksCompiled/project/linux64/../../../openFrameworks/video/ofGstVideoGrabber.cpp|82|undefined reference to `udev_device_new_from_syspath'|  
/home/menno/Downloads/of_preRelease_v007_linux64/libs/openFrameworksCompiled/project/linux64/../../../openFrameworks/video/ofGstVideoGrabber.cpp|83|undefined reference to `udev_device_get_subsystem'|  
/home/menno/Downloads/of_preRelease_v007_linux64/libs/openFrameworksCompiled/project/linux64/../../../openFrameworks/video/ofGstVideoGrabber.cpp|92|undefined reference to `udev_device_get_devnode'|  
/home/menno/Downloads/of_preRelease_v007_linux64/libs/openFrameworksCompiled/project/linux64/../../../openFrameworks/video/ofGstVideoGrabber.cpp|93|undefined reference to `udev_device_get_properties_list_entry'|  
/home/menno/Downloads/of_preRelease_v007_linux64/libs/openFrameworksCompiled/project/linux64/../../../openFrameworks/video/ofGstVideoGrabber.cpp|96|undefined reference to `udev_list_entry_get_name'|  
/home/menno/Downloads/of_preRelease_v007_linux64/libs/openFrameworksCompiled/project/linux64/../../../openFrameworks/video/ofGstVideoGrabber.cpp|99|undefined reference to `udev_list_entry_get_value'|  
/home/menno/Downloads/of_preRelease_v007_linux64/libs/openFrameworksCompiled/project/linux64/../../../openFrameworks/video/ofGstVideoGrabber.cpp|103|undefined reference to `udev_list_entry_get_value'|  
/home/menno/Downloads/of_preRelease_v007_linux64/libs/openFrameworksCompiled/project/linux64/../../../openFrameworks/video/ofGstVideoGrabber.cpp|95|undefined reference to `udev_list_entry_get_next'|  
/home/menno/Downloads/of_preRelease_v007_linux64/libs/openFrameworksCompiled/project/linux64/../../../openFrameworks/video/ofGstVideoGrabber.cpp|80|undefined reference to `udev_list_entry_get_next'|  
../../../libs/openFrameworksCompiled/lib/linux64/libopenFrameworksDebug.a(ofGstVideoGrabber.o)||In function `get_supported_framerates':|  
/home/menno/Downloads/of_preRelease_v007_linux64/libs/openFrameworksCompiled/project/linux64/../../../openFrameworks/video/ofGstVideoGrabber.cpp|186|undefined reference to `gst_structure_get_value'|  
/home/menno/Downloads/of_preRelease_v007_linux64/libs/openFrameworksCompiled/project/linux64/../../../openFrameworks/video/ofGstVideoGrabber.cpp|187|undefined reference to `gst_fraction_get_type'|  
/home/menno/Downloads/of_preRelease_v007_linux64/libs/openFrameworksCompiled/project/linux64/../../../openFrameworks/video/ofGstVideoGrabber.cpp|188|undefined reference to `gst_value_get_fraction_numerator'|  
/home/menno/Downloads/of_preRelease_v007_linux64/libs/openFrameworksCompiled/project/linux64/../../../openFrameworks/video/ofGstVideoGrabber.cpp|189|undefined reference to `gst_value_get_fraction_denominator'|  
/home/menno/Downloads/of_preRelease_v007_linux64/libs/openFrameworksCompiled/project/linux64/../../../openFrameworks/video/ofGstVideoGrabber.cpp|193|undefined reference to `gst_value_list_get_type'|  
/home/menno/Downloads/of_preRelease_v007_linux64/libs/openFrameworksCompiled/project/linux64/../../../openFrameworks/video/ofGstVideoGrabber.cpp|194|undefined reference to `gst_value_list_get_size'|  
/home/menno/Downloads/of_preRelease_v007_linux64/libs/openFrameworksCompiled/project/linux64/../../../openFrameworks/video/ofGstVideoGrabber.cpp|196|undefined reference to `gst_value_list_get_value'|  
/home/menno/Downloads/of_preRelease_v007_linux64/libs/openFrameworksCompiled/project/linux64/../../../openFrameworks/video/ofGstVideoGrabber.cpp|197|undefined reference to `gst_value_get_fraction_numerator'|  
/home/menno/Downloads/of_preRelease_v007_linux64/libs/openFrameworksCompiled/project/linux64/../../../openFrameworks/video/ofGstVideoGrabber.cpp|198|undefined reference to `gst_value_get_fraction_denominator'|  
/home/menno/Downloads/of_preRelease_v007_linux64/libs/openFrameworksCompiled/project/linux64/../../../openFrameworks/video/ofGstVideoGrabber.cpp|203|undefined reference to `gst_fraction_range_get_type'|  
/home/menno/Downloads/of_preRelease_v007_linux64/libs/openFrameworksCompiled/project/linux64/../../../openFrameworks/video/ofGstVideoGrabber.cpp|208|undefined reference to `gst_value_get_fraction_range_min'|  
/home/menno/Downloads/of_preRelease_v007_linux64/libs/openFrameworksCompiled/project/linux64/../../../openFrameworks/video/ofGstVideoGrabber.cpp|209|undefined reference to `gst_value_get_fraction_numerator'|  
/home/menno/Downloads/of_preRelease_v007_linux64/libs/openFrameworksCompiled/project/linux64/../../../openFrameworks/video/ofGstVideoGrabber.cpp|210|undefined reference to `gst_value_get_fraction_denominator'|  
/home/menno/Downloads/of_preRelease_v007_linux64/libs/openFrameworksCompiled/project/linux64/../../../openFrameworks/video/ofGstVideoGrabber.cpp|212|undefined reference to `gst_value_get_fraction_range_max'|  
/home/menno/Downloads/of_preRelease_v007_linux64/libs/openFrameworksCompiled/project/linux64/../../../openFrameworks/video/ofGstVideoGrabber.cpp|213|undefined reference to `gst_value_get_fraction_numerator'|  
/home/menno/Downloads/of_preRelease_v007_linux64/libs/openFrameworksCompiled/project/linux64/../../../openFrameworks/video/ofGstVideoGrabber.cpp|214|undefined reference to `gst_value_get_fraction_denominator'|  
../../../libs/openFrameworksCompiled/lib/linux64/libopenFrameworksDebug.a(ofGstVideoGrabber.o)||In function `get_supported_video_formats':|  
/home/menno/Downloads/of_preRelease_v007_linux64/libs/openFrameworksCompiled/project/linux64/../../../openFrameworks/video/ofGstVideoGrabber.cpp|320|undefined reference to `gst_caps_get_size'|  
/home/menno/Downloads/of_preRelease_v007_linux64/libs/openFrameworksCompiled/project/linux64/../../../openFrameworks/video/ofGstVideoGrabber.cpp|324|undefined reference to `gst_caps_get_structure'|  
/home/menno/Downloads/of_preRelease_v007_linux64/libs/openFrameworksCompiled/project/linux64/../../../openFrameworks/video/ofGstVideoGrabber.cpp|326|undefined reference to `gst_structure_get_value'|  
/home/menno/Downloads/of_preRelease_v007_linux64/libs/openFrameworksCompiled/project/linux64/../../../openFrameworks/video/ofGstVideoGrabber.cpp|327|undefined reference to `gst_structure_get_value'|  
/home/menno/Downloads/of_preRelease_v007_linux64/libs/openFrameworksCompiled/project/linux64/../../../openFrameworks/video/ofGstVideoGrabber.cpp|332|undefined reference to `gst_structure_get_name'|  
/home/menno/Downloads/of_preRelease_v007_linux64/libs/openFrameworksCompiled/project/linux64/../../../openFrameworks/video/ofGstVideoGrabber.cpp|333|undefined reference to `gst_structure_get_int'|  
/home/menno/Downloads/of_preRelease_v007_linux64/libs/openFrameworksCompiled/project/linux64/../../../openFrameworks/video/ofGstVideoGrabber.cpp|334|undefined reference to `gst_structure_get_int'|  
/home/menno/Downloads/of_preRelease_v007_linux64/libs/openFrameworksCompiled/project/linux64/../../../openFrameworks/video/ofGstVideoGrabber.cpp|336|undefined reference to `gst_int_range_get_type'|  
/home/menno/Downloads/of_preRelease_v007_linux64/libs/openFrameworksCompiled/project/linux64/../../../openFrameworks/video/ofGstVideoGrabber.cpp|340|undefined reference to `gst_value_get_int_range_min'|  
/home/menno/Downloads/of_preRelease_v007_linux64/libs/openFrameworksCompiled/project/linux64/../../../openFrameworks/video/ofGstVideoGrabber.cpp|341|undefined reference to `gst_value_get_int_range_max'|  
||More errors follow but not being shown.|  
||Edit the max errors limit in compiler options...|  
||=== Build finished: 50 errors, 15 warnings ===|  
  

I think you are right jack is dependent on libjack, however the version of ardour from my repository (I think main stable?) installs a different version: libjack-jackd2-0. Apt-get does give the following warnings:

  
Removing libjack-dev ...  
dpkg: libjack0: dependency problems, but removing anyway as you requested:  
 gstreamer0.10-plugins-good depends on libjack-jackd2-0 (>= 1.9.5~dfsg-14) | libjack-0.116; however:  
  Package libjack-jackd2-0 is not installed.  
  Package libjack-0.116 is not installed.  
  Package libjack-jackd2-0 which provides libjack-0.116 is not installed.  
  Package libjack0 which provides libjack-0.116 is to be removed.  
  ...and then a list of about 20 other dependency problems...  
  

So maybe this has to do with the way in which ardour/qjackctl is dependent on some certain version of libjack, which is somehow incompatible with oF 007? Missing ardour is not so problematic, but qjackctl is really useful, and I am not so familiar at operating jack from bash…