PDA

View Full Version : OpenGL SuperBible Fourth Edition Compile Problems



CallMeCrazy
03-06-2013, 12:03 PM
I recently received a copy of OpenGL SuperBible Fourth Edition and I started using it in VSC++ 2010. Everything was working fine for me until the beginning of this week (I'm working on a school computer, therefore I have no idea what the faculty or other students do to them). Anyway, here is my problem:

When I create a project, say for example "simple" from chapter 2:



//Took some stuff out here so it would actually let me post... They were just comments

#include "M:\Programming\OPenGL\shared\gltools.h" // OpenGL toolkit

///////////////////////////////////////////////////////////
// Called to draw scene
void RenderScene(void)
{
// Clear the window with current clearing color
glClear(GL_COLOR_BUFFER_BIT);


// Flush drawing commands
glFlush();
}

///////////////////////////////////////////////////////////
// Setup the rendering state
void SetupRC(void)
{
glClearColor(0.0f, 0.0f, 1.0f, 1.0f);
}

///////////////////////////////////////////////////////////
// Main program entry point
int main(int argc, char* argv[])
{
glutInit(&argc, argv);
glutInitDisplayMode(GLUT_SINGLE | GLUT_RGBA);
glutCreateWindow("Simple");
glutDisplayFunc(RenderScene);

SetupRC();

glutMainLoop();

return 0;
}



When I attempt to compile, I receive the following error:

1>------ Build started: Project: Test, Configuration: Debug Win32 ------
1> main.cpp
1>LINK : fatal error LNK1104: cannot open file 'freeglut_static.lib'
========== Build: 0 succeeded, 1 failed, 0 up-to-date, 0 skipped ==========

freeglut_static.lib is located in M:\Programming\OPenGL\shared

Now, in Project -> Properties -> Configuration Properties -> VC++ Directories -> Library Directories, I insert: M:\Programming\OPenGL\shared;
I attempt to compile again, and I receive the error:

1>------ Build started: Project: Test, Configuration: Debug Win32 ------
1>LINK : fatal error LNK1104: cannot open file 'LIBC.lib'
========== Build: 0 succeeded, 1 failed, 0 up-to-date, 0 skipped ==========

In response to this, I again go to Project -> Properties -> Configuration Properties -> Linker -> Input -> Ignore Specific Default Libraries and I type in LIBC.lib.
I attempt to compile again, and I receive the error:

1>------ Build started: Project: Test, Configuration: Debug Win32 ------
1>freeglut_static.lib(freeglut_main.obj) : error LNK2019: unresolved external symbol __iob referenced in function _fgError
1>freeglut_static.lib(freeglut_display.obj) : error LNK2001: unresolved external symbol __iob
1>M:\Programming\OpenGL\Projects\Test\Debug\Test.exe : fatal error LNK1120: 1 unresolved externals
========== Build: 0 succeeded, 1 failed, 0 up-to-date, 0 skipped ==========

From here, I have no idea what to do. Any help would be appreciated, thanks.

*The steps above I followed from searching on Google, but I keep running into more problems when I finish the one before and I could not find a solution to the last error.
To find the source I used, just Google OpenGL SuperBible, top link, fourth edition on the left, then download Complete source for all sample programs

CallMeCrazy
03-12-2013, 11:17 AM
This is known as a bump.