如何让 SuperBible 中的 GLTools 库在 Ubuntu 中工作?或替代方案

How to get the GLTools library from SuperBible to work in Ubuntu? or an alternative?

本文关键字:工作 方案 Ubuntu SuperBible 中的 库在 GLTools      更新时间:2023-10-16

我最近买了超级圣经第5版的书。我使用 Ubuntu 12.04 LTS。我使用代码::块。我对C++库和设置不是很精通。我想要一本能从零开始指导我的书。当我看到这本书不能帮助我们在Linux中建立项目时,我感到很失望。

他们使用2个库,freeglut和GLTools。我读了这个精彩的教程,它解释了 Linux 的 freeglut 部分。

现在我对GLTools一无所知。我在 debian.org 中搜索了一个包含GLTools.h的包裹,但没有。所以,我根本找不到包裹。在这里,他们确实提供了 库 ,但它仅适用于 Windows 和 Mac。在 Ubuntu 中包含库是小菜一碟(只是终端中的一个命令),但我不知道如何使用 Windows 库。

有没有其他的书可以帮助Linux?

编辑:在完成了HaloWebMaster所说的第一个2个步骤之后,我做了一张CD,然后进入了gltools文件夹(那里有一个makefile)。在那里我做了make all.但这就是事实:

Package OpenEXR was not found in the pkg-config search path.
Perhaps you should add the directory containing `OpenEXR.pc'
to the PKG_CONFIG_PATH environment variable
No package 'OpenEXR' found
make[1]: sdl-config: Command not found
make[1]: Entering directory `/home/user/gltools/framework'
make[1]: freetype-config: Command not found
Package OpenEXR was not found in the pkg-config search path.
Perhaps you should add the directory containing `OpenEXR.pc'
to the PKG_CONFIG_PATH environment variable
No package 'OpenEXR' found
make[1]: sdl-config: Command not found
make[1]: freetype-config: Command not found
Compiling camera.cpp
Package OpenEXR was not found in the pkg-config search path.
Perhaps you should add the directory containing `OpenEXR.pc'
to the PKG_CONFIG_PATH environment variable
No package 'OpenEXR' found
make[1]: sdl-config: Command not found
make[1]: freetype-config: Command not found
Package OpenEXR was not found in the pkg-config search path.
Perhaps you should add the directory containing `OpenEXR.pc'
to the PKG_CONFIG_PATH environment variable
No package 'OpenEXR' found
make[1]: sdl-config: Command not found
make[1]: freetype-config: Command not found
Compiling fs.cpp
Package OpenEXR was not found in the pkg-config search path.
Perhaps you should add the directory containing `OpenEXR.pc'
to the PKG_CONFIG_PATH environment variable
No package 'OpenEXR' found
make[1]: sdl-config: Command not found
make[1]: freetype-config: Command not found
Package OpenEXR was not found in the pkg-config search path.
Perhaps you should add the directory containing `OpenEXR.pc'
to the PKG_CONFIG_PATH environment variable
No package 'OpenEXR' found
make[1]: sdl-config: Command not found
make[1]: freetype-config: Command not found
Compiling image/image-convert.cpp
image/image-convert.cpp:7:18: fatal error: half.h: No such file or directory
compilation terminated.
Compilation failed for libgltools_a_image-convert.o: 
make[1]: *** [libgltools_a_image-convert.o] Error 1
make[1]: Leaving directory `/home/user/gltools/framework'
make: *** [framework] Error 2
wget http://gltools.svn.sourceforge.net/viewvc/gltools/?view=tar
tar xzvf gltools.tar.gz
make all

找到更好的方法:svn checkout http://oglsuperbible5.googlecode.c./Src/GLTools/include/om/svn/trunk/ oglsuperbible5-read-only,然后将文件从 ./Src/GLTools/include/复制到$INCLUDE中的某个位置