问题描述
im | gcc 4.2.1,尝试构建教程 http://www.arcsynthesis.org/gltut/
im on mac os snow leopard gcc 4.5.4 | gcc 4.2.1, trying to build the tutorials http://www.arcsynthesis.org/gltut/
首先需要构建dir glsdk.我通过macports freeglut @ 2.8.0_1(活动)安装freeglut(必备软件),然后手动复制并粘贴其lib,并将其包含在dir glsdk中,以便ls ..../Tutorial_0_3_8/glsdk/freeglut-> include lib(我无法构建freeglut,这就是为什么我用macports中的freeglut代替它的原因)
one needs to build dir glsdk first. I install freeglut (prerequisite) via macports freeglut @2.8.0_1 (active) and manually copy and paste its lib and include folders in dir glsdk so thatls ..../Tutorial_0_3_8/glsdk/freeglut -> include lib(I couldn't build the freeglut provided that's why I replace it with the one from macports)
修复了许多错误(主要是由于包含了旧代码片段)之后,我正在测试目录中测试构建,当我尝试运行生成的可执行文件./TestD时,我得到了:
after fixing many errors (mostly due to legacy snippets included) I'm testing the build in Test dir and when I try to run the generated executable ./TestD, I get:
这是什么?稍作搜索就表明这是驾驶员的问题(?).当我将glut与其他gl代码一起使用时,它运行得很好
what's this? a bit of search suggests this is a driver's problem(?)..when I use glut with other gl code it runs just fine
推荐答案
我的X11损坏了**,这似乎是问题所在.由于构建这套教程非常棘手,因此我对遇到类似问题的任何人重复执行我的步骤
my X11 is broken** and this seems to be the problem.since it's tricky to build this set of tutorials, I repeat the steps I followed for anyone facing similar trouble
- 获取源文件 https://bitbucket.org/alfonse/gltut/downloads ,解压缩并填补空白,以使您拥有Tutorial_0_3_8而不是Tutorial 0 3 8
- 在glsdk目录中,在premake4.lua中将
--"freeglut/freeglut.lua
注释掉 - 在glsdk目录中,依次是
./premake gmake
和make config=release
- 在框架目录framework.cpp中,手动替换宏
LOCAL_FILE_DIR
&GLOBAL_FILE_DIR
和"./data/""./data/"
&"../data/"
并注释掉#include "directories.h"
- 从根目录或您需要的那些教程中一步一步构建所有教程.在Test目录中,放置正确的路径以包含freeglut标头,并使用以下链接:在Test.make中,将
-I../glsdk/glutil/include
和-L../glsdk/glutil/lib
替换为通过macports从freeglut生成的路径.同样在与-lglut
而不是-lfreeglut
的同一makefile链接中
- get the source https://bitbucket.org/alfonse/gltut/downloads, untar and fill in the gaps so that you have Tutorial_0_3_8 instead of Tutorial 0 3 8
- in glsdk directory, comment out
--"freeglut/freeglut.lua
, in premake4.lua - in glsdk directory,
./premake gmake
and thenmake config=release
- in framework directory, framework.cpp, manually replace macros
LOCAL_FILE_DIR
&GLOBAL_FILE_DIR
with "./data/""./data/"
&"../data/"
respectively and comment out#include "directories.h"
- build all the tutorials in a single step from root or those that you need, e.g. in Test directory put the right paths to include for freeglut headers and link with the:in Test.make replace
-I../glsdk/glutil/include
and-L../glsdk/glutil/lib
with paths from freeglut build via macports. Also in the same makefile link with-lglut
instead of-lfreeglut
** dyld: Symbol not found: __cg_DGifGetLine Referenced from: /System/Library/Frameworks/ApplicationServices.framework/Versions/A/Frameworks/ImageIO.framework/Versions/A/ImageIO Expected in: /opt/local/lib/libGIF.dylib in /System/Library/Frameworks/ApplicationServices.framework/Versions/A/Frameworks/ImageIO.framework/Versions/A/ImageIO
**dyld: Symbol not found: __cg_DGifGetLine Referenced from: /System/Library/Frameworks/ApplicationServices.framework/Versions/A/Frameworks/ImageIO.framework/Versions/A/ImageIO Expected in: /opt/local/lib/libGIF.dylib in /System/Library/Frameworks/ApplicationServices.framework/Versions/A/Frameworks/ImageIO.framework/Versions/A/ImageIO
这篇关于Mac OS Snow Leopard上的freeglut问题(通过macports构建良好)的文章就介绍到这了,希望我们推荐的答案对大家有所帮助,也希望大家多多支持!