gpt4 book ai didi

c++ - 链接库 (C++)

转载 作者:行者123 更新时间:2023-11-30 04:40:24 25 4
gpt4 key购买 nike

通过 Eclipse 将 MinGW 用于 C/C++,并尝试让 GLUT(OpenGL Utility Toolkit)在其上运行,但我怀疑这是一个简单的问题。

尝试构建结果:

g++ -LC:\Documents and Settings\C\workspace\GLUTtest\Debug -LC:\Tools\MinGW\include\GL -LC:\Tools\MinGW\include -oGLUTtest.exe main.o -lglut32.libC:\Tools\MinGW\bin..\lib\gcc\mingw32\3.4.5.......\mingw32\bin\ld.exe: 找不到 -lglut32.lib

我在工作区目录 C:\Documents and Settings\C\workspace\GLUTtest 中有 glut32.lib。以下是 eclipse 给出的选项:

-L"C:\Documents and Settings\C\workspace\GLUTtest"-L"C:\Documents and Settings\C\workspace\GLUTtest\Debug"-L"C:\Documents and Settings\C\workspace\GLUTtest\GL"-L"C:\Tools\MinGW\include\GL"-L"C:\Tools\MinGW\include"

知道为什么它不获取库吗?

最佳答案

您似乎试图将包含目录作为链接目录传递。找到包含 glut32.lib 的目录,并为找到的目录添加链接目录参数 (-L)。

关于c++ - 链接库 (C++),我们在Stack Overflow上找到一个类似的问题: https://stackoverflow.com/questions/1420092/

25 4 0
Copyright 2021 - 2024 cfsdn All Rights Reserved 蜀ICP备2022000587号
广告合作:1813099741@qq.com 6ren.com