1>c:\program files (x86)\microsoft sdks\windows\v7.0a\include\gl\glaux.h(17): warning C4068: unknown pragma
1>c:\program files (x86)\microsoft sdks\windows\v7.0a\include\gl\glaux.h(374): warning C4068: unknown pragma
1>c:\users\josh\documents\visual studio 2010\projects\glopen_game\glopen_game\main.cpp(50): warning C4789: destination of memory copy is too small
1>c:\users\josh\documents\visual studio 2010\projects\glopen_game\glopen_game\main.cpp(51): warning C4789: destination of memory copy is too small
1>c:\users\josh\documents\visual studio 2010\projects\glopen_game\glopen_game\main.cpp(69): warning C4789: destination of memory copy is too small
i forgot to remove the header but that has been edited out. but the problem continues.
now it’s only
1>c:\users\josh\documents\visual studio 2010\projects\glopen_game\glopen_game\main.cpp(49): warning C4789: destination of memory copy is too small
1>c:\users\josh\documents\visual studio 2010\projects\glopen_game\glopen_game\main.cpp(50): warning C4789: destination of memory copy is too small
1>c:\users\josh\documents\visual studio 2010\projects\glopen_game\glopen_game\main.cpp(68): warning C4789: destination of memory copy is too small
You should not hook the idle func each click. like the mouse func. hook the idle func. in main. If u want to call your drawing func, use glutPostRedisplay.
I haven’t looked elsewhere in your code for other similar mistakes.
Arrays in C/C++ are 0-based, not 1-based. An array with 4 elements (float partPosition[4]) should index them as 0 to 3 (partPosition[0], partPosition[1], partPosition[2], partPosition[3]), not 1 to 4 (partPosition[1], partPosition[2], partPosition[3], partPosition[4]). You’ve basically got buffer overflows all over your code.
Okay well thanks on the Array, It’s clear in my head now but the worst part is…
Now I’m getting no errors and the same thing is happening… it runs openGL then text appears in the C++ window and closes down… all i can see id the word Debug before it closes.
Could u post the whole code now after the changes?
One more thing, could u tell me
the compiler u r using,
the glut version u r using,
anything else that may be useful
'glOpen_Game.exe': Loaded 'C:\Users\Josh\Documents\Visual Studio 2010\Projects\glOpen_Game\Release\glOpen_Game.exe', Symbols loaded.
'glOpen_Game.exe': Loaded 'C:\Windows\SysWOW64
tdll.dll', Cannot find or open the PDB file
'glOpen_Game.exe': Loaded 'C:\Windows\SysWOW64\kernel32.dll', Cannot find or open the PDB file
'glOpen_Game.exe': Loaded 'C:\Windows\SysWOW64\KernelBase.dll', Cannot find or open the PDB file
'glOpen_Game.exe': Loaded 'C:\Windows\SysWOW64\opengl32.dll', Cannot find or open the PDB file
'glOpen_Game.exe': Loaded 'C:\Windows\SysWOW64\msvcrt.dll', Cannot find or open the PDB file
'glOpen_Game.exe': Loaded 'C:\Windows\SysWOW64\advapi32.dll', Cannot find or open the PDB file
'glOpen_Game.exe': Loaded 'C:\Windows\SysWOW64\sechost.dll', Cannot find or open the PDB file
'glOpen_Game.exe': Loaded 'C:\Windows\SysWOW64\rpcrt4.dll', Cannot find or open the PDB file
'glOpen_Game.exe': Loaded 'C:\Windows\SysWOW64\sspicli.dll', Cannot find or open the PDB file
'glOpen_Game.exe': Loaded 'C:\Windows\SysWOW64\cryptbase.dll', Cannot find or open the PDB file
'glOpen_Game.exe': Loaded 'C:\Windows\SysWOW64\gdi32.dll', Cannot find or open the PDB file
'glOpen_Game.exe': Loaded 'C:\Windows\SysWOW64\user32.dll', Cannot find or open the PDB file
'glOpen_Game.exe': Loaded 'C:\Windows\SysWOW64\lpk.dll', Cannot find or open the PDB file
'glOpen_Game.exe': Loaded 'C:\Windows\SysWOW64\usp10.dll', Cannot find or open the PDB file
'glOpen_Game.exe': Loaded 'C:\Windows\SysWOW64\glu32.dll', Cannot find or open the PDB file
'glOpen_Game.exe': Loaded 'C:\Windows\SysWOW64\ddraw.dll', Cannot find or open the PDB file
'glOpen_Game.exe': Loaded 'C:\Windows\SysWOW64\dciman32.dll', Cannot find or open the PDB file
'glOpen_Game.exe': Loaded 'C:\Windows\SysWOW64\setupapi.dll', Cannot find or open the PDB file
'glOpen_Game.exe': Loaded 'C:\Windows\SysWOW64\cfgmgr32.dll', Cannot find or open the PDB file
'glOpen_Game.exe': Loaded 'C:\Windows\SysWOW64\oleaut32.dll', Cannot find or open the PDB file
'glOpen_Game.exe': Loaded 'C:\Windows\SysWOW64\ole32.dll', Cannot find or open the PDB file
'glOpen_Game.exe': Loaded 'C:\Windows\SysWOW64\devobj.dll', Cannot find or open the PDB file
'glOpen_Game.exe': Loaded 'C:\Windows\SysWOW64\dwmapi.dll', Cannot find or open the PDB file
'glOpen_Game.exe': Loaded 'C:\Windows\glut32.dll', Binary was not built with debug information.
'glOpen_Game.exe': Loaded 'C:\Windows\SysWOW64\winmm.dll', Cannot find or open the PDB file
'glOpen_Game.exe': Loaded 'C:\Windows\SysWOW64\msvcr100.dll', Symbols loaded.
'glOpen_Game.exe': Loaded 'C:\Windows\SysWOW64\imm32.dll', Cannot find or open the PDB file
'glOpen_Game.exe': Loaded 'C:\Windows\SysWOW64\msctf.dll', Cannot find or open the PDB file
'glOpen_Game.exe': Loaded 'C:\Windows\SysWOW64\uxtheme.dll', Cannot find or open the PDB file
'glOpen_Game.exe': Loaded 'C:\Windows\SysWOW64\atiglpxx.dll', Cannot find or open the PDB file
'glOpen_Game.exe': Loaded 'C:\Windows\SysWOW64\atioglxx.dll', Cannot find or open the PDB file
'glOpen_Game.exe': Loaded 'C:\Windows\SysWOW64\version.dll', Cannot find or open the PDB file
'glOpen_Game.exe': Loaded 'C:\Windows\SysWOW64\ws2_32.dll', Cannot find or open the PDB file
'glOpen_Game.exe': Loaded 'C:\Windows\SysWOW64
si.dll', Cannot find or open the PDB file
'glOpen_Game.exe': Loaded 'C:\Windows\SysWOW64\atigktxx.dll', Cannot find or open the PDB file
'glOpen_Game.exe': Loaded 'C:\Windows\SysWOW64\aticfx32.dll', Cannot find or open the PDB file
'glOpen_Game.exe': Loaded 'C:\Windows\SysWOW64\atiadlxy.dll', Cannot find or open the PDB file
'glOpen_Game.exe': Loaded 'C:\Windows\SysWOW64\wintrust.dll', Cannot find or open the PDB file
'glOpen_Game.exe': Loaded 'C:\Windows\SysWOW64\crypt32.dll', Cannot find or open the PDB file
'glOpen_Game.exe': Loaded 'C:\Windows\SysWOW64\msasn1.dll', Cannot find or open the PDB file
'glOpen_Game.exe': Loaded 'C:\Windows\SysWOW64\clbcatq.dll', Cannot find or open the PDB file
The program '[2176] glOpen_Game.exe: Native' has exited with code 1 (0x1).
'glOpen_Game.exe': Loaded 'C:\Users\Josh\Documents\Visual Studio 2010\Projects\glOpen_Game\Release\glOpen_Game.exe', Symbols loaded.
You are compiling your program in release mode, so no debugging information is available with the compiled code. Compile your code in debug mode, then run the debugger on your program. But do not try to step inside a function that is included in the foreign dll’s because those will not have debugging symbol even in debugging mode.
Switch to the Debug build in Configuration Manager, Ctrl-Shift-B to compile, then F5 to run it in the debugger. It should break at the point at which it’s crashing, which will tell you which line of code is causing your trouble.
It’s probably also worth while switching the Character Set from Unicode (the default in MSVC 2010) to Multi-Byte; GLUT is a really old library that predates more widespread use of Unicode so there may be interoperability problems.