1

I'm running an OpenGL tutorial program using Visual Studio 10 and have seen it work on other machines but closes straight after running on mine. A small blank image display window pops up for a split second before it goes back to the code as if everything went smoothly.

Here is the output I'm getting:

'Tutorials.exe': Loaded 'C:\Users\Nathan\Documents\Visual Studio 2010\Projects\Tutorials\Debug\Tutorials.exe', Symbols loaded.
'Tutorials.exe': Loaded 'C:\Windows\SysWOW64\ntdll.dll', Cannot find or open the PDB file
'Tutorials.exe': Loaded 'C:\Windows\SysWOW64\kernel32.dll', Cannot find or open the PDB file
'Tutorials.exe': Loaded 'C:\Windows\SysWOW64\KernelBase.dll', Cannot find or open the PDB file
'Tutorials.exe': Loaded 'C:\Program Files\AVAST Software\Avast\snxhk.dll', Cannot find or open the PDB file
'Tutorials.exe': Loaded 'C:\Users\Nathan\Documents\Visual Studio 2010\Projects\Tutorials\Debug\glew32.dll', Binary was not built with debug information.
'Tutorials.exe': Loaded 'C:\Windows\SysWOW64\opengl32.dll', Cannot find or open the PDB file
'Tutorials.exe': Loaded 'C:\Windows\SysWOW64\msvcrt.dll', Cannot find or open the PDB file
'Tutorials.exe': Loaded 'C:\Windows\SysWOW64\advapi32.dll', Cannot find or open the PDB file
'Tutorials.exe': Loaded 'C:\Windows\SysWOW64\sechost.dll', Cannot find or open the PDB file
'Tutorials.exe': Loaded 'C:\Windows\SysWOW64\rpcrt4.dll', Cannot find or open the PDB file
'Tutorials.exe': Loaded 'C:\Windows\SysWOW64\sspicli.dll', Cannot find or open the PDB file
'Tutorials.exe': Loaded 'C:\Windows\SysWOW64\cryptbase.dll', Cannot find or open the PDB file
'Tutorials.exe': Loaded 'C:\Windows\SysWOW64\gdi32.dll', Cannot find or open the PDB file
'Tutorials.exe': Loaded 'C:\Windows\SysWOW64\user32.dll', Cannot find or open the PDB file
'Tutorials.exe': Loaded 'C:\Windows\SysWOW64\lpk.dll', Cannot find or open the PDB file
'Tutorials.exe': Loaded 'C:\Windows\SysWOW64\usp10.dll', Cannot find or open the PDB file
'Tutorials.exe': Loaded 'C:\Windows\SysWOW64\glu32.dll', Cannot find or open the PDB file
'Tutorials.exe': Loaded 'C:\Windows\SysWOW64\ddraw.dll', Cannot find or open the PDB file
'Tutorials.exe': Loaded 'C:\Windows\SysWOW64\dciman32.dll', Cannot find or open the PDB file
'Tutorials.exe': Loaded 'C:\Windows\SysWOW64\setupapi.dll', Cannot find or open the PDB file
'Tutorials.exe': Loaded 'C:\Windows\SysWOW64\cfgmgr32.dll', Cannot find or open the PDB file
'Tutorials.exe': Loaded 'C:\Windows\SysWOW64\oleaut32.dll', Cannot find or open the PDB file
'Tutorials.exe': Loaded 'C:\Windows\SysWOW64\ole32.dll', Cannot find or open the PDB file
'Tutorials.exe': Loaded 'C:\Windows\SysWOW64\devobj.dll', Cannot find or open the PDB file
'Tutorials.exe': Loaded 'C:\Windows\SysWOW64\dwmapi.dll', Cannot find or open the PDB file
'Tutorials.exe': Loaded 'C:\Users\Nathan\Documents\Visual Studio 2010\Projects\Tutorials\Debug\freeglut.dll', Binary was not built with debug information.
'Tutorials.exe': Loaded 'C:\Windows\SysWOW64\winmm.dll', Cannot find or open the PDB file
'Tutorials.exe': Loaded 'C:\Windows\SysWOW64\msvcp100d.dll', Symbols loaded.
'Tutorials.exe': Loaded 'C:\Windows\SysWOW64\msvcr100d.dll', Symbols loaded.
'Tutorials.exe': Loaded 'C:\Windows\SysWOW64\imm32.dll', Cannot find or open the PDB file
'Tutorials.exe': Loaded 'C:\Windows\SysWOW64\msctf.dll', Cannot find or open the PDB file
'Tutorials.exe': Loaded 'C:\Windows\SysWOW64\uxtheme.dll', Cannot find or open the PDB file
'Tutorials.exe': Loaded 'C:\Windows\SysWOW64\HsSrv.dll', Cannot find or open the PDB file
'Tutorials.exe': Loaded 'C:\Windows\SysWOW64\dsound.dll', Cannot find or open the PDB file
'Tutorials.exe': Loaded 'C:\Windows\SysWOW64\powrprof.dll', Cannot find or open the PDB file
'Tutorials.exe': Loaded 'C:\Windows\SysWOW64\version.dll', Cannot find or open the PDB file
'Tutorials.exe': Loaded 'C:\Windows\SysWOW64\atiglpxx.dll', Cannot find or open the PDB file
'Tutorials.exe': Loaded 'C:\Windows\SysWOW64\atioglxx.dll', Cannot find or open the PDB file
'Tutorials.exe': Loaded 'C:\Windows\SysWOW64\atiadlxy.dll', Cannot find or open the PDB file
'Tutorials.exe': Loaded 'C:\Windows\SysWOW64\shell32.dll', Cannot find or open the PDB file
'Tutorials.exe': Loaded 'C:\Windows\SysWOW64\shlwapi.dll', Cannot find or open the PDB file
'Tutorials.exe': Loaded 'C:\Windows\SysWOW64\propsys.dll', Cannot find or open the PDB file
'Tutorials.exe': Loaded 'C:\Windows\SysWOW64\userenv.dll', Cannot find or open the PDB file
'Tutorials.exe': Loaded 'C:\Windows\SysWOW64\profapi.dll', Cannot find or open the PDB file
'Tutorials.exe': Loaded 'C:\Windows\SysWOW64\wtsapi32.dll', Cannot find or open the PDB file
'Tutorials.exe': Loaded 'C:\Windows\SysWOW64\psapi.dll', Cannot find or open the PDB file
'Tutorials.exe': Loaded 'C:\Windows\SysWOW64\ws2_32.dll', Cannot find or open the PDB file
'Tutorials.exe': Loaded 'C:\Windows\SysWOW64\nsi.dll', Cannot find or open the PDB file
'Tutorials.exe': Loaded 'C:\Windows\SysWOW64\IPHLPAPI.DLL', Cannot find or open the PDB file
'Tutorials.exe': Loaded 'C:\Windows\SysWOW64\winnsi.dll', Cannot find or open the PDB file
'Tutorials.exe': Loaded 'C:\Windows\SysWOW64\wintrust.dll', Cannot find or open the PDB file
'Tutorials.exe': Loaded 'C:\Windows\SysWOW64\crypt32.dll', Cannot find or open the PDB file
'Tutorials.exe': Loaded 'C:\Windows\SysWOW64\msasn1.dll', Cannot find or open the PDB file
'Tutorials.exe': Loaded 'C:\Windows\SysWOW64\atigktxx.dll', Cannot find or open the PDB file
'Tutorials.exe': Loaded 'C:\Windows\SysWOW64\aticfx32.dll', Cannot find or open the PDB file
Invalid parameter passed to C runtime function.
Invalid parameter passed to C runtime function.
Invalid parameter passed to C runtime function.
Invalid parameter passed to C runtime function.
'Tutorials.exe': Unloaded 'C:\Windows\SysWOW64\atigktxx.dll'
'Tutorials.exe': Loaded 'C:\Windows\SysWOW64\atigktxx.dll', Cannot find or open the PDB file
'Tutorials.exe': Loaded 'C:\Windows\SysWOW64\clbcatq.dll', Cannot find or open the PDB file
The thread 'Win32 Thread' (0xaf0) has exited with code 1 (0x1).
The program '[6208] Tutorials.exe: Native' has exited with code 1 (0x1).

I'm not great with this kind of stuff so hopefully someone here can make sense of this.

4

2 回答 2

0

我有一个类似的问题,我可能正在运行相同的教程。

使用调试器找出程序崩溃的地方。如果是函数

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

那么您的 GPU 可能无法解释此版本的 OpenGL。尝试更新驱动程序,或找到 glutInitContextVersion(4,0) 并为其提供参数,例如glutInitContextVersion(3,3)旧版本的 OpenGL。

于 2013-12-01T11:52:18.497 回答
0

当您的日志报告时,您需要查看函数中传递的参数:

传递给 C 运行时函数的参数无效。

首先,您应该在调试模式下构建它,以便生成 PDB 文件并且您可以实际调试它。

项目属性 - 配置属性 - 链接器 - 调试 - 生成调试信息:是

然后只是调试。正如评论所提到的,除了上述行之外,这里的输出是无用的。

于 2013-08-13T18:40:54.710 回答