Scheduled Maintenance: We are aware of an issue with Google, AOL, and Yahoo services as email providers which are blocking new registrations. We are trying to fix the issue and we have several internal and external support tickets in process to resolve the issue. Please see: viewtopic.php?t=158230

 

 

 

Linking with Cmake While Compiling

If none of the specific sub-forums seem right for your thread, ask here.
Post Reply
Message
Author
buminatrain
Posts: 2
Joined: 2009-06-23 02:29

Linking with Cmake While Compiling

#1 Post by buminatrain »

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*

User avatar
stevepusser
Posts: 12930
Joined: 2009-10-06 05:53
Has thanked: 41 times
Been thanked: 71 times

Re: Linking with Cmake While Compiling

#2 Post by stevepusser »

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.
MX Linux packager and developer

buminatrain
Posts: 2
Joined: 2009-06-23 02:29

Re: Linking with Cmake While Compiling

#3 Post by buminatrain »

Hey thanks so much I appreciate it! Going to give it a go as soon as I have a few minutes.

Post Reply