Linking with Cmake While Compiling

If none of the more specific forums is the right place to ask

Linking with Cmake While Compiling

Postby buminatrain » 2011-10-09 19:28

Hello I am trying to compile a program from source which uses cmake.

Once I enter the main directory I switch to the build directory execute "cmake ../src", which I believe generates the makefile.

From there I issue "make"... which results in almost 100% completion however at the end of the make process I generate this error

Linking CXX executable pianobooster
/usr/bin/ld: CMakeFiles/pianobooster.dir/Score.o: undefined reference to symbol 'glNewList'
/usr/bin/ld: note: 'glNewList' is defined in DSO /usr/lib/libGL.so.1 so try adding it to the linker command line
/usr/lib/libGL.so.1: could not read symbols: Invalid operation
collect2: ld returned 1 exit status
make[2]: *** [pianobooster] Error 1
make[1]: *** [CMakeFiles/pianobooster.dir/all] Error 2
make: *** [all] Error 2


Alternatively I will return a similar error which refers to lpthread rather the libgl.

I understand I can somehow link these libraries in the make file possibly with CFLAGS options but I do not quite understand how... any help would be greatly appreciated.

Thanks

*Edit I am on Squeeze and have all dependencies satisfied*
buminatrain
 
Posts: 2
Joined: 2009-06-23 02:29

Re: Linking with Cmake While Compiling

Postby stevepusser » 2011-10-10 00:28

Hmmmm...do you have libqt4-opengl-dev installed?

That looks like it would be a nice addition to the community repo...so being lazy, here's how I make a proper Debian package:

Has someone already done most of the work, as in Ubuntu or a PPA? Yes, the source files are here:

http://ppa.launchpad.net/racb/extra/ubu ... nobooster/

I follow this procedure: https://sites.google.com/site/stevosfil ... kports.txt

I would see if the build-depends will install that libqt4-opengl-dev package automatically and see if building without it causes the error, and with it fixes it.

I'm going to try that now...

Edit: Yes, I got a good .deb package build from the sources. It appears that the libqt4-opengl-dev package is what you need.
stevepusser
 
Posts: 3682
Joined: 2009-10-06 05:53

Re: Linking with Cmake While Compiling

Postby buminatrain » 2011-10-11 23:28

Hey thanks so much I appreciate it! Going to give it a go as soon as I have a few minutes.
buminatrain
 
Posts: 2
Joined: 2009-06-23 02:29


Return to General Questions

Who is online

Users browsing this forum: rosswmcgee and 19 guests

fashionable