2
我试图cabal install GLUT
这给了以下内容:安装GLUT失败,因为缺少国外图书馆 - ghc7.8
Setup: Missing dependency on a foreign library:
* Missing C library: glut32
This problem can usually be solved by installing the system package that
provides this library (you may need the "-dev" version). If the library is
already installed but in a non-standard location then you can use the flags
--extra-include-dirs= and --extra-lib-dirs= to specify where it is.
所以我就想,好吧,让我们的源和点阴谋的目录。我第一次尝试freeglut然后将下面的
cabal install GLUT --extra-include-dirs="<path to freeglut>\include"
--extra-lib-dirs="<path to freeglut>\src"
同样的事情,所以我想,也许它不与freeglut工作,并得到了glut:
cabal install GLUT --extra-include-dirs="<path to glut>\include"
--extra-lib-dirs="<path to glut>\lib"
当这不工作,我尝试在目录下面下载源码和cabal install
,然后runghc Setup configure
。然后认为路径存在一些解析错误,我尝试用各种可能的方法来编写人所知道的文件路径;引号,没有引号,反斜杠,双反斜线,正斜杠,以及上述的每个组合。我甚至将所有文件放在我的PATH
上,希望能找到它们。所有其他选项耗尽,我继续牺牲山羊撒旦,但仍然没有骰子。
问题是,我该怎么做才能说服ghc
找到该库? (这是Windows 7)
最有可能的是,您需要安装glut/freeglut的二进制版本,然后将'--extra-lib-dirs'指向'glut32.dll'所在的路径。 –
@JohnL'glut32.dll'在'PATH'上,所以它应该找到它,但我试过了,结果如预期。 – user2407038