VS can't find PDB files when using GLEW

I took some weeks off to get familiar with C++ syntax and linking. Then, I decided to have another go at following this tutorial and this source code. It compiles for me without errors, but when I try to run it I get many counts of:

'trying_openGL.exe': Loaded 'C:\Windows\SysWOW64
tdll.dll', Cannot find or open the PDB file
'trying_openGL.exe': Loaded 'C:\Windows\SysWOW64\kernel32.dll', Cannot find or open the PDB file
'trying_openGL.exe': Loaded 'C:\Windows\SysWOW64\KernelBase.dll', Cannot find or open the PDB file
'trying_openGL.exe': Loaded 'C:\Windows\SysWOW64\user32.dll', Cannot find or open the PDB file
'trying_openGL.exe': Loaded 'C:\Windows\SysWOW64\gdi32.dll', Cannot find or open the PDB file
'trying_openGL.exe': Loaded 'C:\Windows\SysWOW64\lpk.dll', Cannot find or open the PDB file
'trying_openGL.exe': Loaded 'C:\Windows\SysWOW64\usp10.dll', Cannot find or open the PDB file
'trying_openGL.exe': Loaded 'C:\Windows\SysWOW64\msvcrt.dll', Cannot find or open the PDB file
'trying_openGL.exe': Loaded 'C:\Windows\SysWOW64\advapi32.dll', Cannot find or open the PDB file
'trying_openGL.exe': Loaded 'C:\Windows\SysWOW64\sechost.dll', Cannot find or open the PDB file
'trying_openGL.exe': Loaded 'C:\Windows\SysWOW64\rpcrt4.dll', Cannot find or open the PDB file
'trying_openGL.exe': Loaded 'C:\Windows\SysWOW64\sspicli.dll', Cannot find or open the PDB file
'trying_openGL.exe': Loaded 'C:\Windows\SysWOW64\cryptbase.dll', Cannot find or open the PDB file
'trying_openGL.exe': Loaded 'C:\Windows\SysWOW64\opengl32.dll', Cannot find or open the PDB file
'trying_openGL.exe': Loaded 'C:\Windows\SysWOW64\glu32.dll', Cannot find or open the PDB file
'trying_openGL.exe': Loaded 'C:\Windows\SysWOW64\ddraw.dll', Cannot find or open the PDB file
'trying_openGL.exe': Loaded 'C:\Windows\SysWOW64\dciman32.dll', Cannot find or open the PDB file
'trying_openGL.exe': Loaded 'C:\Windows\SysWOW64\setupapi.dll', Cannot find or open the PDB file
'trying_openGL.exe': Loaded 'C:\Windows\SysWOW64\cfgmgr32.dll', Cannot find or open the PDB file
'trying_openGL.exe': Loaded 'C:\Windows\SysWOW64\oleaut32.dll', Cannot find or open the PDB file
'trying_openGL.exe': Loaded 'C:\Windows\SysWOW64\ole32.dll', Cannot find or open the PDB file
'trying_openGL.exe': Loaded 'C:\Windows\SysWOW64\devobj.dll', Cannot find or open the PDB file
'trying_openGL.exe': Loaded 'C:\Windows\SysWOW64\dwmapi.dll', Cannot find or open the PDB file
'trying_openGL.exe': Loaded 'C:\Windows\SysWOW64\winmm.dll', Cannot find or open the PDB file

And so forth. Also, there’s one message that says:

'trying_openGL.exe': Loaded 'C:\Users\Username\Documents\Visual Studio 2010\Projects	rying_openGL\Debug\freeglut.dll', Binary was not built with debug information.

And, finally at the end of the debug log:

The program '[6612] trying_openGL.exe: Native' has exited with code 1 (0x1).

I suspect it may be because I’m running on a 64-bit system, but it may also be that my graphics card only supports OpenGL 3.1/3.2 (it’s an Intel HD 3000). The source code is good for OpenGL 3.3. Would that produce these errors? I searched up missing PDB files, but I can’t understand why VS can’t find so many PDB files.

It is normal to not have the debug information for those dll files. They belong to Microsoft Windows. For freeglut, you don’t need it either. Are sure those are errors and not warnings? Because if there are errors, I guess your compiler is in strict mode and counts warnings as errors. Contact support.

The tutorial directed me to set set the warning level to W4 (highest) and to set Treat Warnings as Errors to Yes, so I thought that wouldn’t be a problem. Still, when I set the warning level back to W3 (default) and Treat Warnings as Errors to No, I get the same debug output, and still the console pops up and closes right away without any freeGLUT window appearing. What does error code 1 mean?

Have you tried, you know, running the program in the debugger to see where it crashes? With breakpoints and so forth?

I’ve stepped through the code and found it crashes at:

static int FGAPIENTRY FGUNUSED glutCreateWindow_ATEXIT_HACK(const char *title) { return __glutCreateWindowWithExit(title, exit); }

in the file freeglut_std.h
Is that line normally a problem? It didn’t seem so from a google search.

I’ve got it! This:

but it may also be that my graphics card only supports OpenGL 3.1/3.2 (it’s an Intel HD 3000). The source code is good for OpenGL 3.3.

was the problem. I changed glutInitContextVersion(3, 3) to glutInitContextVersion(3, 1) and everything worked fine. Thanks guys! :slight_smile:

On an unrelated note, I can’t seem to edit my prior posts. Sorry for the doublepost, admins. :frowning:

You can download many of these pdb files from Microsoft, if you can want more clues. Google “Microsoft Symbol Server” for details.
Obviously it wouldn’t help you in this issue.