【发布时间】:2015-04-29 21:06:49
【问题描述】:
我在Ubuntu 14.04 上安装OpenEXR_Viewers。运行makefile时遇到如下错误:
/usr/bin/ld: ImageView.o: 未定义对符号“glOrtho”的引用 //usr/lib/x86_64-linux-gnu/mesa/libGL.so.1:添加符号时出错:DSO 命令行 collect2 中缺失:错误:ld 返回 1 个退出状态
我的 lib 工具调用是否可能没有调用 GL?如果是这种情况,如何设置我的 libtool 以使用 GL 构建? (编辑 makefile 以查看 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
【问题讨论】:
-
怎么是重复的? '我的 lib 工具调用是否可能没有调用 GL?如果是这种情况,我该如何设置我的 libtool 以使用 GL 构建?请去掉重复的标记。
标签: linux opengl makefile ubuntu-14.04 libtool