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/ so try adding it to the linker command line
/usr/lib/ 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.


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

Re: Linking with Cmake While Compiling

Postby stevepusser » 2011-10-10 00:28 you have libqt4-opengl-dev installed?

That looks like it would be a nice addition to the community 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: ... nobooster/

I follow this procedure: ... 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.
The MX Linux repositories: Backports galore! If we don't have something, just ask and we'll try--we like challenges. New packages: GIMP 2.10, Pale Moon 27.9.1, Enlightenment 0.22, Calligra 3.1, VLC 3.0.2, Firefox 60.0, Krita 4.0.3
User avatar
Posts: 9534
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.
Posts: 2
Joined: 2009-06-23 02:29

Return to General Questions

Who is online

Users browsing this forum: No registered users and 6 guests