Question

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.

Was it helpful?

Solution 3

I was already using the right lib for debug configuration but was not only linking to GLFW.lib but also to GLFWDLL.lib. You can either compile GLFW into you executeable by using GLFW.lib or use a DLL by linking to GLFWDLL.lib. I accidentally did both.

Additional info at

4.2 Link with the right libraries

in the current GLFW 2.7 Release Notes.

OTHER TIPS

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!

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

Linker Tools Warning LNK4099 PDB 'filename' was not found with 'object/library' or at 'path'; linking object as if no debug info The linker was unable to find your .pdb file. Copy it into the directory that contains object/library.

To find the name of the .pdb file associated with the object file:

  1. Extract an object file from the library with lib /extract:objectname.obj xyz.lib.

  2. Check the path to the .pdb file with dumpbin /section:.debug$T /rawdata objectname.obj.

You could also compile with /Z7, so the pdb doesn't need to be used, or remove the /DEBUG linker option if you do not have .pdb files for the objects you are linking.

Licensed under: CC-BY-SA with attribution
Not affiliated with StackOverflow
scroll top