0

I am installing OpenEXR_Viewers on Ubuntu 14.04. When running the makefile, I encounter the following error:

/usr/bin/ld: ImageView.o: undefined reference to symbol 'glOrtho' //usr/lib/x86_64-linux-gnu/mesa/libGL.so.1: error adding symbols: DSO missing from command line collect2: error: ld returned 1 exit status

Is it likely that my lib tool invocation is not calling GL? If this is the case, how do I set my libtool to build with GL? (Edit the makefile to see OpenGl)

Making all in playexr
make[1]: Entering directory `/home/user/Documents/source/openexr/OpenEXR_Viewers/playexr'
make[1]: Nothing to be done for `all'.
make[1]: Leaving directory `/home/user/Documents/source/openexr/OpenEXR_Viewers/playexr'
Making all in exrdisplay
make[1]: Entering directory `/home/user/Documents/source/openexr/OpenEXR_Viewers/exrdisplay'
/bin/bash ../libtool  --tag=CXX   --mode=link g++ -pipe -g -O2   -o exrdisplay main.o ImageView.o loadImage.o scaleImage.o applyCtl.o GlWindow3d.o -L/usr/local/lib   -pthread -L/usr/local/lib -lIlmImf -lImath-2_2 -lIexMath-2_2 -lHalf -lIex-2_2 -lIlmThread-2_2 -DHAVE_CTL_INTERPRETER=0 -L/usr/local/lib   -DHAVE_CTL_INTERPRETER=0 -pthread -L/usr/local/lib -lIlmImf -lImath-2_2 -lIexMath-2_2 -lHalf -lIex-2_2 -lIlmThread-2_2 -Wl,-Bsymbolic-functions -lfltk_gl -lfltk -lX11 

*** Warning: Linking the executable exrdisplay against the loadable module
*** libImath-2_2.so is not portable!

*** Warning: Linking the executable exrdisplay against the loadable module
*** libIexMath-2_2.so is not portable!

*** Warning: Linking the executable exrdisplay against the loadable module
*** libHalf.so is not portable!

*** Warning: Linking the executable exrdisplay against the loadable module
*** libIex-2_2.so is not portable!

*** Warning: Linking the executable exrdisplay against the loadable module
*** libIlmThread-2_2.so is not portable!
libtool: link: g++ -pipe -g -O2 -o exrdisplay main.o ImageView.o loadImage.o scaleImage.o applyCtl.o GlWindow3d.o -pthread -DHAVE_CTL_INTERPRETER=0 -DHAVE_CTL_INTERPRETER=0 -pthread -Wl,-Bsymbolic-functions  -L/usr/local/lib /usr/local/lib/libIlmImf.so /usr/local/lib/libImath-2_2.so /usr/local/lib/libIexMath-2_2.so /usr/local/lib/libHalf.so /usr/local/lib/libIex-2_2.so /usr/local/lib/libIlmThread-2_2.so -lfltk_gl -lfltk -lX11 -pthread
/usr/bin/ld: ImageView.o: undefined reference to symbol 'glOrtho'
//usr/lib/x86_64-linux-gnu/mesa/libGL.so.1: error adding symbols: DSO missing from command line
collect2: error: ld returned 1 exit status
make[1]: *** [exrdisplay] Error 1
make[1]: Leaving directory `/home/user/Documents/source/openexr/OpenEXR_Viewers/exrdisplay'
make: *** [all-recursive] Error 1
blackirishman
  • 903
  • 1
  • 10
  • 23
  • How is it a duplicate? 'Is it likely that my lib tool invocation is not calling GL? If this is the case, how do I set my libtool to build with GL?' please take away the duplicate mark. – blackirishman Apr 29 '15 at 21:51

1 Answers1

0

Try adding -lglut -lGL (and probably -lGLU) to you linker command.

(g++ linker: /usr/lib/libGL.so.1: could not read symbols: Invalid operation)

UPDATE:

Append it to:

FLTK_LDFLAGS = -Wl,-Bsymbolic-functions -lfltk_gl -lfltk -lX11

like

FLTK_LDFLAGS = -Wl,-Bsymbolic-functions -lfltk_gl -lfltk -lX11 -lglut -lGL
Community
  • 1
  • 1
dekkard
  • 6,121
  • 1
  • 16
  • 26
  • Where exactly would I add that? I assume in my Makefile? – blackirishman Apr 29 '15 at 21:20
  • Yes, to your Makefile, to the line where the ```libtool``` is executed (results in the command line ```libtool: link: g++ -pipe -g -O2 -o exrdisplay main.o ImageView.o loadImage.o scaleImage.o applyCtl.o GlWindow3d.o -pthread -DHAVE_CTL_INTERPRETER=0 -DHAVE_CTL_INTERPRETER=0 -pthread -Wl,-Bsymbolic-functions -L/usr/local/lib /usr/local/lib/libIlmImf.so /usr/local/lib/libImath-2_2.so /usr/local/lib/libIexMath-2_2.so /usr/local/lib/libHalf.so /usr/local/lib/libIex-2_2.so /usr/local/lib/libIlmThread-2_2.so -lfltk_gl -lfltk -lX11 -pthread```) – dekkard Apr 29 '15 at 21:23
  • So looking at the makefile, its unclear where I would add it. Here is a link to paste bin: http://pastebin.com/VjdnuM6h would you be able to point it out to me? – blackirishman Apr 30 '15 at 19:11