本文介绍了Mac OS Snow Leopard上的freeglut问题(通过macports构建良好)的处理方法,对大家解决问题具有一定的参考价值,需要的朋友们下面随着小编来一起学习吧!

问题描述

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

  1. 获取源文件 https://bitbucket.org/alfonse/gltut/downloads ,解压缩并填补空白,以使您拥有Tutorial_0_3_8而不是Tutorial 0 3 8
  2. 在glsdk目录中,在premake4.lua中将--"freeglut/freeglut.lua注释掉
  3. 在glsdk目录中,依次是./premake gmakemake config=release
  4. 在框架目录framework.cpp中,手动替换宏LOCAL_FILE_DIR& GLOBAL_FILE_DIR和"./data/" "./data/"& "../data/"并注释掉#include "directories.h"
  5. 从根目录或您需要的那些教程中一步一步构建所有教程.在Test目录中,放置正确的路径以包含freeglut标头,并使用以下链接:在Test.make中,将-I../glsdk/glutil/include-L../glsdk/glutil/lib替换为通过macports从freeglut生成的路径.同样在与-lglut而不是-lfreeglut
  6. 的同一makefile链接中
  1. 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
  2. in glsdk directory, comment out --"freeglut/freeglut.lua, in premake4.lua
  3. in glsdk directory, ./premake gmake and then make config=release
  4. 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"
  5. 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构建良好)的文章就介绍到这了,希望我们推荐的答案对大家有所帮助,也希望大家多多支持!

09-11 20:25