Thread: "Cannot find or open PDB file" ?

  1. #1
    Registered User
    Join Date
    Apr 2011
    Posts
    14

    Question "Cannot find or open PDB file" ?

    Ok so i'm trying to run the following code, and it does compile and run, displaying the correct output i wanted from the code using FreeGlut and GLTools, and i also have the files freeglut_static.lib and gltools.lib included into the porject: but.......

    Code:
    / Bounce.cpp
    // Bounce a Block around the screen
    
    #include <GLTools.h>	// OpenGL toolkit
    #include <GLShaderManager.h>
    
    #ifdef __APPLE__
    #include <glut/glut.h>
    #else
    #define FREEGLUT_STATIC
    #include <GL/glut.h>
    #endif
    
    GLBatch	squareBatch;
    GLShaderManager	shaderManager;
    
    
    GLfloat blockSize = 0.1f;
    GLfloat vVerts[] = { -blockSize - 0.5f, -blockSize, 0.0f, 
    	                  blockSize - 0.5f, -blockSize, 0.0f,
    					  blockSize - 0.5f,  blockSize, 0.0f,
    					 -blockSize - 0.5f,  blockSize, 0.0f};
    
    ///////////////////////////////////////////////////////////////////////////////
    // This function does any needed initialization on the rendering context. 
    // This is the first opportunity to do any OpenGL related tasks.
    void SetupRC()
    	{
    	// Black background
    	glClearColor(0.0f, 0.0f, 1.0f, 1.0f );
        
    	shaderManager.InitializeStockShaders();
    
    	// Load up a triangle
    	squareBatch.Begin(GL_TRIANGLE_FAN, 4);
    	squareBatch.CopyVertexData3f(vVerts);
    	squareBatch.End();
    	}
    
    // Respond to arrow keys by moving the camera frame of reference
    void BounceFunction(void)
        {
    	static GLfloat xDir = 1.0f;
    	static GLfloat yDir = 1.0f;
    
    	GLfloat stepSize = 0.005f;
    
    	GLfloat blockX = vVerts[0];   // Upper left X
    	GLfloat blockY = vVerts[7];  // Upper left Y
    
    	blockY += stepSize * yDir;
    	blockX += stepSize * xDir;
    
    	// Collision detection
    	if(blockX < -1.0f) { blockX = -1.0f; xDir *= -1.0f; }
    	if(blockX > (1.0f - blockSize * 2)) { blockX = 1.0f - blockSize * 2; xDir *= -1.0f; }
    	if(blockY < -1.0f + blockSize * 2)  { blockY = -1.0f + blockSize * 2; yDir *= -1.0f; }
    	if(blockY > 1.0f) { blockY = 1.0f; yDir *= -1.0f; }
    
    	// Recalculate vertex positions
    	vVerts[0] = blockX;
    	vVerts[1] = blockY - blockSize*2;
    	
    	vVerts[3] = blockX + blockSize*2;
    	vVerts[4] = blockY - blockSize*2;
    	
    	vVerts[6] = blockX + blockSize*2;
    	vVerts[7] = blockY;
    
    	vVerts[9] = blockX;
    	vVerts[10] = blockY;
    
    	squareBatch.CopyVertexData3f(vVerts);
    	}
    
    
    
    
    
    ///////////////////////////////////////////////////////////////////////////////
    // Called to draw scene
    void RenderScene(void)
    	{
    	// Clear the window with current clearing color
    	glClear(GL_COLOR_BUFFER_BIT | GL_DEPTH_BUFFER_BIT | GL_STENCIL_BUFFER_BIT);
    
    	GLfloat vRed[] = { 1.0f, 0.0f, 0.0f, 1.0f };
    	shaderManager.UseStockShader(GLT_SHADER_IDENTITY, vRed);
    	squareBatch.Draw();
    
    	// Flush drawing commands
    	glutSwapBuffers();
    
    	BounceFunction();
    	glutPostRedisplay(); // Redraw
    	}
    
    
    
    ///////////////////////////////////////////////////////////////////////////////
    // Window has changed size, or has just been created. In either case, we need
    // to use the window dimensions to set the viewport and the projection matrix.
    void ChangeSize(int w, int h)
    	{
    	glViewport(0, 0, w, h);
    	}
    
    ///////////////////////////////////////////////////////////////////////////////
    // Main entry point for GLUT based programs
    int main(int argc, char* argv[])
    	{
    	gltSetWorkingDirectory(argv[0]);
    	
    	glutInit(&argc, argv);
    	glutInitDisplayMode(GLUT_DOUBLE | GLUT_RGBA | GLUT_DEPTH);
    	glutInitWindowSize(800, 600);
    	glutCreateWindow("Bouncing Block");
    	
    	GLenum err = glewInit();
    	if (GLEW_OK != err)
    		{
    		// Problem: glewInit failed, something is seriously wrong.
    		fprintf(stderr, "Error: %s\n", glewGetErrorString(err));
    		return 1;
    		}
    	
    	glutReshapeFunc(ChangeSize);
    	glutDisplayFunc(RenderScene);
    
    	SetupRC();
    
    	glutMainLoop();
    	return 0;
    	}
    But right before the window pops up and displays a bouncing square these errors pop up:

    Code:
    'Bounce.exe': Loaded 'C:\SB5\VisualStudio2008\Chapter02\Bounce\Debug\Bounce.exe', Symbols loaded.
    'Bounce.exe': Loaded 'C:\Windows\SysWOW64\ntdll.dll', Cannot find or open the PDB file
    'Bounce.exe': Loaded 'C:\Windows\SysWOW64\kernel32.dll', Cannot find or open the PDB file
    'Bounce.exe': Loaded 'C:\Windows\SysWOW64\KernelBase.dll', Cannot find or open the PDB file
    'Bounce.exe': Loaded 'C:\Windows\SysWOW64\user32.dll', Cannot find or open the PDB file
    'Bounce.exe': Loaded 'C:\Windows\SysWOW64\gdi32.dll', Cannot find or open the PDB file
    'Bounce.exe': Loaded 'C:\Windows\SysWOW64\lpk.dll', Cannot find or open the PDB file
    'Bounce.exe': Loaded 'C:\Windows\SysWOW64\usp10.dll', Cannot find or open the PDB file
    'Bounce.exe': Loaded 'C:\Windows\SysWOW64\msvcrt.dll', Cannot find or open the PDB file
    'Bounce.exe': Loaded 'C:\Windows\SysWOW64\advapi32.dll', Cannot find or open the PDB file
    'Bounce.exe': Loaded 'C:\Windows\SysWOW64\sechost.dll', Cannot find or open the PDB file
    'Bounce.exe': Loaded 'C:\Windows\SysWOW64\rpcrt4.dll', Cannot find or open the PDB file
    'Bounce.exe': Loaded 'C:\Windows\SysWOW64\sspicli.dll', Cannot find or open the PDB file
    'Bounce.exe': Loaded 'C:\Windows\SysWOW64\cryptbase.dll', Cannot find or open the PDB file
    'Bounce.exe': Loaded 'C:\Windows\SysWOW64\opengl32.dll', Cannot find or open the PDB file
    'Bounce.exe': Loaded 'C:\Windows\SysWOW64\glu32.dll', Cannot find or open the PDB file
    'Bounce.exe': Loaded 'C:\Windows\SysWOW64\ddraw.dll', Cannot find or open the PDB file
    'Bounce.exe': Loaded 'C:\Windows\SysWOW64\dciman32.dll', Cannot find or open the PDB file
    'Bounce.exe': Loaded 'C:\Windows\SysWOW64\setupapi.dll', Cannot find or open the PDB file
    'Bounce.exe': Loaded 'C:\Windows\SysWOW64\cfgmgr32.dll', Cannot find or open the PDB file
    'Bounce.exe': Loaded 'C:\Windows\SysWOW64\oleaut32.dll', Cannot find or open the PDB file
    'Bounce.exe': Loaded 'C:\Windows\SysWOW64\ole32.dll', Cannot find or open the PDB file
    'Bounce.exe': Loaded 'C:\Windows\SysWOW64\devobj.dll', Cannot find or open the PDB file
    'Bounce.exe': Loaded 'C:\Windows\SysWOW64\dwmapi.dll', Cannot find or open the PDB file
    'Bounce.exe': Loaded 'C:\Windows\SysWOW64\winmm.dll', Cannot find or open the PDB file
    'Bounce.exe': Loaded 'C:\Windows\SysWOW64\imm32.dll', Cannot find or open the PDB file
    'Bounce.exe': Loaded 'C:\Windows\SysWOW64\msctf.dll', Cannot find or open the PDB file
    'Bounce.exe': Loaded 'C:\Windows\SysWOW64\uxtheme.dll', Cannot find or open the PDB file
    'Bounce.exe': Loaded 'C:\Program Files (x86)\Common Files\microsoft shared\ink\tiptsf.dll', Cannot find or open the PDB file
    'Bounce.exe': Loaded 'C:\Windows\SysWOW64\version.dll', Cannot find or open the PDB file
    'Bounce.exe': Loaded 'C:\Windows\SysWOW64\ig4icd32.dll', Cannot find or open the PDB file
    'Bounce.exe': Loaded 'C:\Windows\SysWOW64\clbcatq.dll', Cannot find or open the PDB file
    'Bounce.exe': Loaded 'C:\Windows\SysWOW64\oleacc.dll', Cannot find or open the PDB file
    First-chance exception at 0x10132c1e in Bounce.exe: 0xC0000005: Access violation reading location 0x00000014.
    The program '[6440] Bounce.exe: Native' has exited with code 0 (0x0).
    Even though the code still runs..... Should i try to fix this? and if so... How?
    Thanks!! =)
    Last edited by GRIFFnDOOR; 04-11-2011 at 10:59 PM. Reason: Forgot something...

  2. #2
    and the hat of int overfl Salem's Avatar
    Join Date
    Aug 2001
    Location
    The edge of the known universe
    Posts
    39,660
    > 'Bounce.exe': Loaded 'C:\SB5\VisualStudio2008\Chapter02\Bounce\Debug\Bo unce.exe', Symbols loaded.
    This is the only one you need to care about for debugging.

    > 'Bounce.exe': Loaded 'C:\Windows\SysWOW64\ntdll.dll', Cannot find or open the PDB file
    These you can ignore. All it means is that it would be VERY HARD for you to debug the associated file.
    Since you're not likely to be interested in debugging deep into windows core software, this isn't an issue.
    You can get the debug symbols for these, but it isn't necessary for you at the moment.

    > First-chance exception at 0x10132c1e in Bounce.exe: 0xC0000005: Access violation reading location 0x00000014.
    This is your program crashing with a memory reference error.
    You should run the program in the debugger, and find out where in the code it is.
    If you dance barefoot on the broken glass of undefined behaviour, you've got to expect the occasional cut.
    If at first you don't succeed, try writing your phone number on the exam paper.

  3. #3
    Officially An Architect brewbuck's Avatar
    Join Date
    Mar 2007
    Location
    Portland, OR
    Posts
    7,396
    Short answer: Ignore it. Your program is crashing though, you'll need to fix that.

    Long answer: You're seeing messages from the debugger, telling you that it doesn't have the symbols for various modules. Microsoft provides a way to automatically synchronize with the proper symbols by setting the environment variable _NT_SYMBOL_PATH=SRV*C:\symbols*http://msdl.microsoft.com/download/symbols -- those messages will go away, and you'll have access to symbolic information about the internals of Windows. (If you understand nothing of what I just said, ignore it and go with the "short answer")
    Code:
    //try
    //{
    	if (a) do { f( b); } while(1);
    	else   do { f(!b); } while(1);
    //}

  4. #4
    C++まいる!Cをこわせ!
    Join Date
    Oct 2007
    Location
    Inside my computer
    Posts
    24,654
    Visual Studio provides a built-in way to get symbols from a symbol server. 2008 SP1+ also provides a button to directly get symbols from Microsoft's server. Easy as pie, if you need it.
    Quote Originally Posted by Adak View Post
    io.h certainly IS included in some modern compilers. It is no longer part of the standard for C, but it is nevertheless, included in the very latest Pelles C versions.
    Quote Originally Posted by Salem View Post
    You mean it's included as a crutch to help ancient programmers limp along without them having to relearn too much.

    Outside of your DOS world, your header file is meaningless.

Popular pages Recent additions subscribe to a feed

Similar Threads

  1. Use system("file location") to open root folder?
    By muffinman8641 in forum C++ Programming
    Replies: 9
    Last Post: 03-17-2011, 10:45 AM
  2. Replies: 18
    Last Post: 05-26-2008, 11:23 PM
  3. fatal error LNK1104: cannot open file "Files\Microsoft.obj"
    By chintugavali in forum C Programming
    Replies: 2
    Last Post: 03-14-2008, 07:33 AM
  4. IE7 and Firefox2 "open file" option
    By joelsmit in forum Tech Board
    Replies: 1
    Last Post: 01-11-2007, 03:18 AM
  5. IE7 and Firefox2 "open file" option
    By joelsmit in forum C++ Programming
    Replies: 1
    Last Post: 01-11-2007, 03:18 AM

Tags for this Thread