GLFW 控制台项目中的 LNK4099 具有调试配置
在 Visual Studio 2010 SP1 中使用 GLFW 编译 win32 控制台项目时,我收到以下调试配置警告:
Warnung 1 warning LNK4099: PDB "vc100.pdb" wurde nicht mit "GLFW.lib(enable.obj)" oder an "C:\path-to-project with-spaces\World\Debug\vc100.pdb" gefunden; Objekt wird verknüpft, als ob keine Debuginformationen vorhanden wären. C:\path-to-project with-spaces\World\World\GLFW.lib(enable.obj) World
13 more for GLFW.lib(enable.obj), GLFW.lib(glext.obj), GLFW.lib(image .obj), GLFW.lib(init.obj), GLFW.lib(input.obj), GLFW.lib(stream.obj), GLFW.lib(tga.obj)、GLFW.lib(win32_enable.obj)、GLFW.lib(win32_fullscreen.obj)、GLFW.lib(win32_glext.obj)、GLFW.lib(win32_init.obj)、GLFW.lib(win32_time) .obj), GLFW.lib(win32_window.obj), GLFW.lib(window.obj)
最后但并非最不重要的一点是:
Fehler 15 error LNK1104: Datei "C:\path-to-project with-spaces\World\Debug\World.exe" kann nicht geöffnet werden. C:\path-to-project with-spaces\World\World\LINK World
正在编译发布配置。这可能仍然不足以解决我的问题,但我希望能解释为什么会发生这种情况。
When compiling a win32 console project with GLFW in Visual Studio 2010 SP1, I am getting the following warning for debug configuration:
Warnung 1 warning LNK4099: PDB "vc100.pdb" wurde nicht mit "GLFW.lib(enable.obj)" oder an "C:\path-to-project with-spaces\World\Debug\vc100.pdb" gefunden; Objekt wird verknüpft, als ob keine Debuginformationen vorhanden wären. C:\path-to-project with-spaces\World\World\GLFW.lib(enable.obj) World
13 more for GLFW.lib(enable.obj), GLFW.lib(glext.obj), GLFW.lib(image.obj), GLFW.lib(init.obj), GLFW.lib(input.obj), GLFW.lib(stream.obj), GLFW.lib(tga.obj), GLFW.lib(win32_enable.obj), GLFW.lib(win32_fullscreen.obj), GLFW.lib(win32_glext.obj), GLFW.lib(win32_init.obj), GLFW.lib(win32_time.obj), GLFW.lib(win32_window.obj), GLFW.lib(window.obj)
And last but not least:
Fehler 15 error LNK1104: Datei "C:\path-to-project with-spaces\World\Debug\World.exe" kann nicht geöffnet werden. C:\path-to-project with-spaces\World\World\LINK World
The release configuration is compiling. This is probably still not enough information for solving my problem, but I would appreciate an explanation for why this can happen.
如果你对这篇内容有疑问,欢迎到本站社区发帖提问 参与讨论,获取更多帮助,或者扫码二维码加入 Web 技术交流群。
绑定邮箱获取回复消息
由于您还没有绑定你的真实邮箱,如果其他用户或者作者回复了您的评论,将不能在第一时间通知您!
发布评论
评论(3)
我不知道警告/错误在说什么,因为我不懂任何德语,但通常如果某些内容编译/链接用于发布但不进行调试(反之亦然),这意味着您链接到错误的库对于那些不起作用的人。 GLFW 库是否有特定的调试库(.dll 或 .lib)?有时您必须告诉 VS 使用一种作为项目的发布配置,并使用另一种作为项目的调试配置。检查类似 glfw.lib 和 glfw_d.lib 的内容,其中 _d 表示调试库。
或者,如果您可以提供链接警告/错误的英文翻译,我也许可以提供更多帮助。
祝你好运!
I don't know what the warnings/errors are saying because I don't know any German whatsoever, but generally if something compiles/links for release but not debug (or vice-versa) this means you're linking to the wrong libraries for the one that isn't working. Are there specific debug libraries (.dll's or .lib's) for the GLFW library? Sometimes you have to tell VS to use one for your project's release configuration and a different one for your project's debug configuration. Check for something like glfw.lib and glfw_d.lib, where the _d would indicate the debug library.
Or if you could supply the English translation of the link warnings/errors I might be able to help more.
Good luck!
每当使用 VC++ 构建项目失败时,最好查阅 MSDN 并获取错误代码。在您的情况下 http://msdn.microsoft.com /en-en/library/b7whw3f3(v=vs.80).aspx
Whenever building a project with VC++ fails, it's best to consult the MSDN with the error code. In your case http://msdn.microsoft.com/en-en/library/b7whw3f3(v=vs.80).aspx
我已经使用正确的库进行调试配置,但不仅链接到 GLFW.lib,还链接到 GLFWDLL.lib。您可以使用
GLFW.lib
将 GLFW 编译为可执行文件,也可以使用 DLL通过链接到GLFWDLL.lib
。我不小心同时做了这两件事。附加信息位于
4.2 链接到当前GLFW 2.7 发行说明中的
I was already using the right lib for debug configuration but was not only linking to
GLFW.lib
but also toGLFWDLL.lib
. You can either compile GLFW into you executeable by usingGLFW.lib
or use a DLL by linking toGLFWDLL.lib
. I accidentally did both.Additional info at
in the current GLFW 2.7 Release Notes.