Solaris-x86 中未定义的符号 sunOglCurPrimTablePtr
我正在将 C++ 程序从 Solaris Sparc 移植到 Solaris x86。该程序利用 OpenGL 库,并在 中执行编译机器附带带有默认 GCC (3.4.3) 和 OpenGL 库的 Sun Ultra27 工作站。
但是,链接时找不到以下 OpenGL 调用:
Undefined symbol first referenced in file
sunOglCurPrimTablePtr ../../lib/libgltt.so
sunOglCurrentContext ../../lib/libgltt.so
其中,sunOglCurPrimTablePtr 和 sunOglCurrentContext 都应该在默认 OpenGL 库 /usr/lib/libGL.so 中可用(链接到 /usr/X11/lib/NVIDIA/libGL.so .1).但我从中找不到任何东西:
> nm /usr/lib/libGL.so
/usr/lib/libGL.so:
在网络、SUN 或 Nvidia 上搜索都没有找到任何有用的资源。有什么线索或帮助吗?谢谢!
I was porting a C++ program from Solaris Sparc to Solaris x86. The program utilizes OpenGL library and the compilation is performed in a Sun Ultra27 workstation with the default GCC (3.4.3) and OpenGL library come with the machine.
However, the following OpenGL call couldn't found while linking:
Undefined symbol first referenced in file
sunOglCurPrimTablePtr ../../lib/libgltt.so
sunOglCurrentContext ../../lib/libgltt.so
which, both sunOglCurPrimTablePtr and sunOglCurrentContext should be available in the default OpenGL library /usr/lib/libGL.so (links to /usr/X11/lib/NVIDIA/libGL.so.1). But I couldn't find anything from it:
> nm /usr/lib/libGL.so
/usr/lib/libGL.so:
Searching on web, SUN or Nvidia didn't lead to any helpful resource. Any clue or helps? Thanks!
如果你对这篇内容有疑问,欢迎到本站社区发帖提问 参与讨论,获取更多帮助,或者扫码二维码加入 Web 技术交流群。
绑定邮箱获取回复消息
由于您还没有绑定你的真实邮箱,如果其他用户或者作者回复了您的评论,将不能在第一时间通知您!
发布评论
评论(1)
事实证明,某些标准的OpenGL API 会被翻译成SUN 的内部函数。通过定义 SUN_OGL_NO_VERTEX_MACRO 编译标志,程序将不再引用 sunOgl* 符号,问题得到解决。
该信息位于 http://java423.vicp.net:8652/infoserver.central/data/syshbk/collections/TECHNICALINSTRUCTION/1-61-210284-1.html,第 9 项:
SUN Solaris Sparc 附带的 OpenGL 库包含 SUN 内部例程。但Solaris x86/x64(由NVIDIA提供)的OpenGL库中不存在它们。我不确定“翻译”到底发生在哪里,但我们的问题解决了! :)
It turned out that certain standard OpenGL API would be translated into SUN's internal functions. By defining SUN_OGL_NO_VERTEX_MACRO compilation flag, the program wouldn't refer to sunOgl* symbol anymore and the issue resolved.
The information is found at http://java423.vicp.net:8652/infoserver.central/data/syshbk/collections/TECHNICALINSTRUCTION/1-61-210284-1.html, item 9:
The OpenGL libraries came with SUN Solaris Sparc contains SUN internal routines. But they are not existed in the OpenGL libraris in Solaris x86/x64 (which is provided by NVIDIA). I am not sure where exactly is the "translation" occurred, but our issue resolved! :)