I Need Help Compiling Some C/c++ Code For Windows
<div class="IPBDescription">I only know the *nix way</div> Ok so I've used some of <a href='http://www.xmission.com/~nate/opengl.html' target='_blank'>Nate Robins'</a> code (a .obj file viewer) for a school project. Basically I've implemented a method for rendering 3d models in the style of technical manuals (in otherwords, I didn't invent this, just redid it). Basically I can open standard .obj files and swap between normal shading methods (sorry the pics are kind've big):
<img src='http://www.cs.utah.edu/~gooch/thesis/jpgs/foot_diffuse.jpg' border='0' alt='user posted image' />
and make'em look cool:
<img src='http://www.cs.utah.edu/~gooch/thesis/jpgs/foot_2644_no_gamma_corr.jpg' border='0' alt='user posted image' />
Anyhow, I can compile it in linux, but I'd like to get a windows binary going so I can show it to some friends (and anyone interested from these forums). I've grabbed Dev-C++ from bloodshed software which includes a c/c++ compiler, and I tried to install GLUT for windows as per the instructions, but the compiler returns errors like "[Linker error] undefined reference to '__glutInitWithExit'" so I'm guessing GLUT isn't working out so well.
So if anyone here knows a thing or two about compiling code for windows I'd love to hear for you, and by the way, the code comes with, and includes, direct32.h which has the comments:
"Win32 lacks unix dirent support. But, we can fake it. Many thanks to Dave Lubrik (lubrik@jaka.ece.uiuc.edu) who found and fixed many bugs in the original code."
So I'm guessing the code is somewhat win32 ready.
Also, I'm not big into modelling, but if you guys use something that exports models to the .obj format, I'd love to see more in this program.
<img src='http://www.cs.utah.edu/~gooch/thesis/jpgs/foot_diffuse.jpg' border='0' alt='user posted image' />
and make'em look cool:
<img src='http://www.cs.utah.edu/~gooch/thesis/jpgs/foot_2644_no_gamma_corr.jpg' border='0' alt='user posted image' />
Anyhow, I can compile it in linux, but I'd like to get a windows binary going so I can show it to some friends (and anyone interested from these forums). I've grabbed Dev-C++ from bloodshed software which includes a c/c++ compiler, and I tried to install GLUT for windows as per the instructions, but the compiler returns errors like "[Linker error] undefined reference to '__glutInitWithExit'" so I'm guessing GLUT isn't working out so well.
So if anyone here knows a thing or two about compiling code for windows I'd love to hear for you, and by the way, the code comes with, and includes, direct32.h which has the comments:
"Win32 lacks unix dirent support. But, we can fake it. Many thanks to Dave Lubrik (lubrik@jaka.ece.uiuc.edu) who found and fixed many bugs in the original code."
So I'm guessing the code is somewhat win32 ready.
Also, I'm not big into modelling, but if you guys use something that exports models to the .obj format, I'd love to see more in this program.
Comments
Did you include the GLUT lib file?
The compile log has <i>all</i> the error messages, exactly what's being included and not included, etc. etc. You said you were using Dev-Cpp, so I know that it generates details of the compile\link when you build a project - post those details. We might not be able to help you, but that log contains most of the necessary information.
<!--c1--></div><table border='0' align='center' width='95%' cellpadding='3' cellspacing='1'><tr><td><b>CODE</b> </td></tr><tr><td id='CODE'><!--ec1-->Compiler: Default compiler
Executing gcc.exe...
gcc.exe "C:\Documents and Settings\Boss\Desktop\Old desktop\591final\smooth.c" -o "C:\Documents and Settings\Boss\Desktop\Old desktop\591final\smooth.exe" -I"I:\Program Files\Dev-Cpp\include" -L"I:\Program Files\Dev-Cpp\lib"
C:\DOCUME~1\Boss\LOCALS~1\Temp/ccUpaaaa.o(.text+0x15):smooth.c: undefined reference to `__glutInitWithExit'
C:\DOCUME~1\Boss\LOCALS~1\Temp/ccUpaaaa.o(.text+0x30):smooth.c: undefined reference to `__glutCreateWindowWithExit'
C:\DOCUME~1\Boss\LOCALS~1\Temp/ccUpaaaa.o(.text+0x4c):smooth.c: undefined reference to `__glutCreateMenuWithExit'
C:\DOCUME~1\Boss\LOCALS~1\Temp/ccUpaaaa.o(.text+0x23f):smooth.c: undefined reference to `_imp__glDisable'
C:\DOCUME~1\Boss\LOCALS~1\Temp/ccUpaaaa.o(.text+0x251):smooth.c: undefined reference to `_imp__glMatrixMode'
C:\DOCUME~1\Boss\LOCALS~1\Temp/ccUpaaaa.o(.text+0x25b):smooth.c: undefined reference to `_imp__glPushMatrix'
C:\DOCUME~1\Boss\LOCALS~1\Temp/ccUpaaaa.o(.text+0x262):smooth.c: undefined reference to `_imp__glLoadIdentity'
C:\DOCUME~1\Boss\LOCALS~1\Temp/ccUpaaaa.o(.text+0x27c):smooth.c: undefined reference to `glutGet'
C:\DOCUME~1\Boss\LOCALS~1\Temp/ccUpaaaa.o(.text+0x29c):smooth.c: undefined reference to `glutGet'
C:\DOCUME~1\Boss\LOCALS~1\Temp/ccUpaaaa.o(.text+0x2b7):smooth.c: undefined reference to `_imp__glOrtho'
C:\DOCUME~1\Boss\LOCALS~1\Temp/ccUpaaaa.o(.text+0x2c9):smooth.c: undefined reference to `_imp__glMatrixMode'
C:\DOCUME~1\Boss\LOCALS~1\Temp/ccUpaaaa.o(.text+0x2d3):smooth.c: undefined reference to `_imp__glPushMatrix'
C:\DOCUME~1\Boss\LOCALS~1\Temp/ccUpaaaa.o(.text+0x2da):smooth.c: undefined reference to `_imp__glLoadIdentity'
C:\DOCUME~1\Boss\LOCALS~1\Temp/ccUpaaaa.o(.text+0x2ea):smooth.c: undefined reference to `_imp__glColor3ub'
C:\DOCUME~1\Boss\LOCALS~1\Temp/ccUpaaaa.o(.text+0x301):smooth.c: undefined reference to `_imp__glRasterPos2i'
C:\DOCUME~1\Boss\LOCALS~1\Temp/ccUpaaaa.o(.text+0x34b):smooth.c: undefined reference to `_imp__glRasterPos2i'
C:\DOCUME~1\Boss\LOCALS~1\Temp/ccUpaaaa.o(.text+0x361):smooth.c: undefined reference to `glutBitmapCharacter'
C:\DOCUME~1\Boss\LOCALS~1\Temp/ccUpaaaa.o(.text+0x37f):smooth.c: undefined reference to `_imp__glColor3ub'
C:\DOCUME~1\Boss\LOCALS~1\Temp/ccUpaaaa.o(.text+0x392):smooth.c: undefined reference to `_imp__glRasterPos2i'
C:\DOCUME~1\Boss\LOCALS~1\Temp/ccUpaaaa.o(.text+0x3d9):smooth.c: undefined reference to `_imp__glRasterPos2i'
C:\DOCUME~1\Boss\LOCALS~1\Temp/ccUpaaaa.o(.text+0x3ef):smooth.c: undefined reference to `glutBitmapCharacter'
C:\DOCUME~1\Boss\LOCALS~1\Temp/ccUpaaaa.o(.text+0x406):smooth.c: undefined reference to `_imp__glMatrixMode'
C:\DOCUME~1\Boss\LOCALS~1\Temp/ccUpaaaa.o(.text+0x410):smooth.c: undefined reference to `_imp__glPopMatrix'
C:\DOCUME~1\Boss\LOCALS~1\Temp/ccUpaaaa.o(.text+0x41f):smooth.c: undefined reference to `_imp__glMatrixMode'
C:\DOCUME~1\Boss\LOCALS~1\Temp/ccUpaaaa.o(.text+0x429):smooth.c: undefined reference to `_imp__glPopMatrix'
C:\DOCUME~1\Boss\LOCALS~1\Temp/ccUpaaaa.o(.text+0x438):smooth.c: undefined reference to `_imp__glEnable'
C:\DOCUME~1\Boss\LOCALS~1\Temp/ccUpaaaa.o(.text+0x4be):smooth.c: undefined reference to `_imp__glMaterialfv'
C:\DOCUME~1\Boss\LOCALS~1\Temp/ccUpaaaa.o(.text+0x4d9):smooth.c: undefined reference to `_imp__glMaterialfv'
C:\DOCUME~1\Boss\LOCALS~1\Temp/ccUpaaaa.o(.text+0x4f4):smooth.c: undefined reference to `_imp__glMaterialfv'
C:\DOCUME~1\Boss\LOCALS~1\Temp/ccUpaaaa.o(.text+0x50e):smooth.c: undefined reference to `_imp__glMaterialf'
C:\DOCUME~1\Boss\LOCALS~1\Temp/ccUpaaaa.o(.text+0x52c):smooth.c: undefined reference to `_imp__glDeleteLists'
C:\DOCUME~1\Boss\LOCALS~1\Temp/ccUpaaaa.o(.text+0x54a):smooth.c: undefined reference to `glmList'
C:\DOCUME~1\Boss\LOCALS~1\Temp/ccUpaaaa.o(.text+0x570):smooth.c: undefined reference to `glmList'
C:\DOCUME~1\Boss\LOCALS~1\Temp/ccUpaaaa.o(.text+0x59f):smooth.c: undefined reference to `glmList'
C:\DOCUME~1\Boss\LOCALS~1\Temp/ccUpaaaa.o(.text+0x5bc):smooth.c: undefined reference to `glmList'
C:\DOCUME~1\Boss\LOCALS~1\Temp/ccUpaaaa.o(.text+0x5eb):smooth.c: undefined reference to `glmList'
C:\DOCUME~1\Boss\LOCALS~1\Temp/ccUpaaaa.o(.text+0x605):smooth.c: more undefined references to `glmList' follow
C:\DOCUME~1\Boss\LOCALS~1\Temp/ccUpaaaa.o(.text+0x71a):smooth.c: undefined reference to `gltbInit'
C:\DOCUME~1\Boss\LOCALS~1\Temp/ccUpaaaa.o(.text+0x72b):smooth.c: undefined reference to `glmReadOBJ'
C:\DOCUME~1\Boss\LOCALS~1\Temp/ccUpaaaa.o(.text+0x741):smooth.c: undefined reference to `glmUnitize'
C:\DOCUME~1\Boss\LOCALS~1\Temp/ccUpaaaa.o(.text+0x768):smooth.c: undefined reference to `glmMakeEdges'
C:\DOCUME~1\Boss\LOCALS~1\Temp/ccUpaaaa.o(.text+0x7a1):smooth.c: undefined reference to `glmFacetNormals'
C:\DOCUME~1\Boss\LOCALS~1\Temp/ccUpaaaa.o(.text+0x7c8):smooth.c: undefined reference to `glmVertexNormals'
C:\DOCUME~1\Boss\LOCALS~1\Temp/ccUpaaaa.o(.text+0x7ee):smooth.c: undefined reference to `findCorners'
C:\DOCUME~1\Boss\LOCALS~1\Temp/ccUpaaaa.o(.text+0x817):smooth.c: undefined reference to `findKmfdm'
C:\DOCUME~1\Boss\LOCALS~1\Temp/ccUpaaaa.o(.text+0x851):smooth.c: undefined reference to `_imp__glEnable'
C:\DOCUME~1\Boss\LOCALS~1\Temp/ccUpaaaa.o(.text+0x863):smooth.c: undefined reference to `_imp__glEnable'
C:\DOCUME~1\Boss\LOCALS~1\Temp/ccUpaaaa.o(.text+0x877):smooth.c: undefined reference to `_imp__glLightModeli'
C:\DOCUME~1\Boss\LOCALS~1\Temp/ccUpaaaa.o(.text+0x889):smooth.c: undefined reference to `_imp__glEnable'
C:\DOCUME~1\Boss\LOCALS~1\Temp/ccUpaaaa.o(.text+0x89b):smooth.c: undefined reference to `_imp__glEnable'
C:\DOCUME~1\Boss\LOCALS~1\Temp/ccUpaaaa.o(.text+0x8b6):smooth.c: undefined reference to `gltbReshape'
C:\DOCUME~1\Boss\LOCALS~1\Temp/ccUpaaaa.o(.text+0x8c8):smooth.c: undefined reference to `_imp__glViewport'
C:\DOCUME~1\Boss\LOCALS~1\Temp/ccUpaaaa.o(.text+0x8da):smooth.c: undefined reference to `_imp__glMatrixMode'
C:\DOCUME~1\Boss\LOCALS~1\Temp/ccUpaaaa.o(.text+0x8e4):smooth.c: undefined reference to `_imp__glLoadIdentity'
C:\DOCUME~1\Boss\LOCALS~1\Temp/ccUpaaaa.o(.text+0x90f):smooth.c: undefined reference to `_imp__gluPerspective'
C:\DOCUME~1\Boss\LOCALS~1\Temp/ccUpaaaa.o(.text+0x921):smooth.c: undefined reference to `_imp__glMatrixMode'
C:\DOCUME~1\Boss\LOCALS~1\Temp/ccUpaaaa.o(.text+0x92b):smooth.c: undefined reference to `_imp__glLoadIdentity'
C:\DOCUME~1\Boss\LOCALS~1\Temp/ccUpaaaa.o(.text+0x93e):smooth.c: undefined reference to `_imp__glTranslatef'
C:\DOCUME~1\Boss\LOCALS~1\Temp/ccUpaaaa.o(.text+0x9e2):smooth.c: undefined reference to `_imp__glClearColor'
C:\DOCUME~1\Boss\LOCALS~1\Temp/ccUpaaaa.o(.text+0x9f4):smooth.c: undefined reference to `_imp__glClear'
C:\DOCUME~1\Boss\LOCALS~1\Temp/ccUpaaaa.o(.text+0x9fe):smooth.c: undefined reference to `_imp__glPushMatrix'
C:\DOCUME~1\Boss\LOCALS~1\Temp/ccUpaaaa.o(.text+0xa24):smooth.c: undefined reference to `_imp__glTranslatef'
C:\DOCUME~1\Boss\LOCALS~1\Temp/ccUpaaaa.o(.text+0xa2e):smooth.c: undefined reference to `gltbMatrix'
C:\DOCUME~1\Boss\LOCALS~1\Temp/ccUpaaaa.o(.text+0xa53):smooth.c: undefined reference to `findSilouettes'
C:\DOCUME~1\Boss\LOCALS~1\Temp/ccUpaaaa.o(.text+0xa6d):smooth.c: undefined reference to `findKmfdm'
C:\DOCUME~1\Boss\LOCALS~1\Temp/ccUpaaaa.o(.text+0xa89):smooth.c: undefined reference to `_imp__glDeleteLists'
C:\DOCUME~1\Boss\LOCALS~1\Temp/ccUpaaaa.o(.text+0xa9e):smooth.c: undefined reference to `glmList'
C:\DOCUME~1\Boss\LOCALS~1\Temp/ccUpaaaa.o(.text+0xac2):smooth.c: undefined reference to `_imp__glLineWidth'
C:\DOCUME~1\Boss\LOCALS~1\Temp/ccUpaaaa.o(.text+0xad4):smooth.c: undefined reference to `_imp__glDisable'
C:\DOCUME~1\Boss\LOCALS~1\Temp/ccUpaaaa.o(.text+0xae3):smooth.c: undefined reference to `_imp__glBegin'
C:\DOCUME~1\Boss\LOCALS~1\Temp/ccUpaaaa.o(.text+0xaf6):smooth.c: undefined reference to `_imp__glColor3f'
C:\DOCUME~1\Boss\LOCALS~1\Temp/ccUpaaaa.o(.text+0xb5e):smooth.c: undefined reference to `_imp__glNormal3fv'
C:\DOCUME~1\Boss\LOCALS~1\Temp/ccUpaaaa.o(.text+0xb85):smooth.c: undefined reference to `_imp__glVertex3fv'
C:\DOCUME~1\Boss\LOCALS~1\Temp/ccUpaaaa.o(.text+0xbad):smooth.c: undefined reference to `_imp__glNormal3fv'
C:\DOCUME~1\Boss\LOCALS~1\Temp/ccUpaaaa.o(.text+0xbd5):smooth.c: undefined reference to `_imp__glVertex3fv'
C:\DOCUME~1\Boss\LOCALS~1\Temp/ccUpaaaa.o(.text+0xbe9):smooth.c: undefined reference to `_imp__glEnd'
C:\DOCUME~1\Boss\LOCALS~1\Temp/ccUpaaaa.o(.text+0xbf8):smooth.c: undefined reference to `_imp__glLineWidth'
C:\DOCUME~1\Boss\LOCALS~1\Temp/ccUpaaaa.o(.text+0xc0b):smooth.c: undefined reference to `_imp__glCallList'
C:\DOCUME~1\Boss\LOCALS~1\Temp/ccUpaaaa.o(.text+0xc1d):smooth.c: undefined reference to `_imp__glDisable'
C:\DOCUME~1\Boss\LOCALS~1\Temp/ccUpaaaa.o(.text+0xc3d):smooth.c: undefined reference to `_imp__glBlendFunc'
C:\DOCUME~1\Boss\LOCALS~1\Temp/ccUpaaaa.o(.text+0xc4f):smooth.c: undefined reference to `_imp__glEnable'
C:\DOCUME~1\Boss\LOCALS~1\Temp/ccUpaaaa.o(.text+0xc61):smooth.c: undefined reference to `_imp__glEnable'
C:\DOCUME~1\Boss\LOCALS~1\Temp/ccUpaaaa.o(.text+0xc79):smooth.c: undefined reference to `_imp__glColor4f'
C:\DOCUME~1\Boss\LOCALS~1\Temp/ccUpaaaa.o(.text+0xc8d):smooth.c: undefined reference to `glutSolidCube'
C:\DOCUME~1\Boss\LOCALS~1\Temp/ccUpaaaa.o(.text+0xc9d):smooth.c: undefined reference to `_imp__glDisable'
C:\DOCUME~1\Boss\LOCALS~1\Temp/ccUpaaaa.o(.text+0xca7):smooth.c: undefined reference to `_imp__glPopMatrix'
C:\DOCUME~1\Boss\LOCALS~1\Temp/ccUpaaaa.o(.text+0xcc0):smooth.c: undefined reference to `glutGet'
C:\DOCUME~1\Boss\LOCALS~1\Temp/ccUpaaaa.o(.text+0xcd4):smooth.c: undefined reference to `_imp__glColor3ub'
C:\DOCUME~1\Boss\LOCALS~1\Temp/ccUpaaaa.o(.text+0xdb3):smooth.c: undefined reference to `glutSwapBuffers'
C:\DOCUME~1\Boss\LOCALS~1\Temp/ccUpaaaa.o(.text+0xdc0):smooth.c: undefined reference to `_imp__glEnable'
C:\DOCUME~1\Boss\LOCALS~1\Temp/ccUpaaaa.o(.text+0x1454):smooth.c: undefined reference to `glmDelete'
C:\DOCUME~1\Boss\LOCALS~1\Temp/ccUpaaaa.o(.text+0x1477):smooth.c: undefined reference to `_imp__glGetIntegerv'
C:\DOCUME~1\Boss\LOCALS~1\Temp/ccUpaaaa.o(.text+0x1497):smooth.c: undefined reference to `_imp__glPolygonMode'
C:\DOCUME~1\Boss\LOCALS~1\Temp/ccUpaaaa.o(.text+0x14b3):smooth.c: undefined reference to `_imp__glPolygonMode'
C:\DOCUME~1\Boss\LOCALS~1\Temp/ccUpaaaa.o(.text+0x14ca):smooth.c: undefined reference to `_imp__glIsEnabled'
C:\DOCUME~1\Boss\LOCALS~1\Temp/ccUpaaaa.o(.text+0x14e0):smooth.c: undefined reference to `_imp__glDisable'
C:\DOCUME~1\Boss\LOCALS~1\Temp/ccUpaaaa.o(.text+0x14f7):smooth.c: undefined reference to `_imp__glEnable'
C:\DOCUME~1\Boss\LOCALS~1\Temp/ccUpaaaa.o(.text+0x153c):smooth.c: undefined reference to `glmReverseWinding'
C:\DOCUME~1\Boss\LOCALS~1\Temp/ccUpaaaa.o(.text+0x155c):smooth.c: undefined reference to `glmScale'
C:\DOCUME~1\Boss\LOCALS~1\Temp/ccUpaaaa.o(.text+0x157c):smooth.c: undefined reference to `glmScale'
C:\DOCUME~1\Boss\LOCALS~1\Temp/ccUpaaaa.o(.text+0x15f1):smooth.c: undefined reference to `findKmfdm'
C:\DOCUME~1\Boss\LOCALS~1\Temp/ccUpaaaa.o(.text+0x1612):smooth.c: undefined reference to `glmVertexNormals'
C:\DOCUME~1\Boss\LOCALS~1\Temp/ccUpaaaa.o(.text+0x1664):smooth.c: undefined reference to `glmWeld'
C:\DOCUME~1\Boss\LOCALS~1\Temp/ccUpaaaa.o(.text+0x1675):smooth.c: undefined reference to `glmFacetNormals'
C:\DOCUME~1\Boss\LOCALS~1\Temp/ccUpaaaa.o(.text+0x168c):smooth.c: undefined reference to `glmVertexNormals'
C:\DOCUME~1\Boss\LOCALS~1\Temp/ccUpaaaa.o(.text+0x16da):smooth.c: undefined reference to `glmVertexNormals'
C:\DOCUME~1\Boss\LOCALS~1\Temp/ccUpaaaa.o(.text+0x1728):smooth.c: undefined reference to `glmVertexNormals'
C:\DOCUME~1\Boss\LOCALS~1\Temp/ccUpaaaa.o(.text+0x1754):smooth.c: undefined reference to `glmScale'
C:\DOCUME~1\Boss\LOCALS~1\Temp/ccUpaaaa.o(.text+0x176c):smooth.c: undefined reference to `glmWriteOBJ'
C:\DOCUME~1\Boss\LOCALS~1\Temp/ccUpaaaa.o(.text+0x1816):smooth.c: undefined reference to `glmFacetNormals'
C:\DOCUME~1\Boss\LOCALS~1\Temp/ccUpaaaa.o(.text+0x182f):smooth.c: undefined reference to `glutPostRedisplay'
C:\DOCUME~1\Boss\LOCALS~1\Temp/ccUpaaaa.o(.text+0x1919):smooth.c: undefined reference to `glmReadOBJ'
C:\DOCUME~1\Boss\LOCALS~1\Temp/ccUpaaaa.o(.text+0x192f):smooth.c: undefined reference to `glmUnitize'
C:\DOCUME~1\Boss\LOCALS~1\Temp/ccUpaaaa.o(.text+0x1956):smooth.c: undefined reference to `glmMakeEdges'
C:\DOCUME~1\Boss\LOCALS~1\Temp/ccUpaaaa.o(.text+0x198f):smooth.c: undefined reference to `glmFacetNormals'
C:\DOCUME~1\Boss\LOCALS~1\Temp/ccUpaaaa.o(.text+0x19b6):smooth.c: undefined reference to `glmVertexNormals'
C:\DOCUME~1\Boss\LOCALS~1\Temp/ccUpaaaa.o(.text+0x19dc):smooth.c: undefined reference to `findCorners'
C:\DOCUME~1\Boss\LOCALS~1\Temp/ccUpaaaa.o(.text+0x1a40):smooth.c: undefined reference to `glutPostRedisplay'
C:\DOCUME~1\Boss\LOCALS~1\Temp/ccUpaaaa.o(.text+0x1a56):smooth.c: undefined reference to `glutGetModifiers'
C:\DOCUME~1\Boss\LOCALS~1\Temp/ccUpaaaa.o(.text+0x1a75):smooth.c: undefined reference to `gltbMouse'
C:\DOCUME~1\Boss\LOCALS~1\Temp/ccUpaaaa.o(.text+0x1ab0):smooth.c: undefined reference to `_imp__glGetDoublev'
C:\DOCUME~1\Boss\LOCALS~1\Temp/ccUpaaaa.o(.text+0x1ac9):smooth.c: undefined reference to `_imp__glGetDoublev'
C:\DOCUME~1\Boss\LOCALS~1\Temp/ccUpaaaa.o(.text+0x1ae2):smooth.c: undefined reference to `_imp__glGetIntegerv'
C:\DOCUME~1\Boss\LOCALS~1\Temp/ccUpaaaa.o(.text+0x1b28):smooth.c: undefined reference to `_imp__gluProject'
C:\DOCUME~1\Boss\LOCALS~1\Temp/ccUpaaaa.o(.text+0x1b76):smooth.c: undefined reference to `_imp__gluUnProject'
C:\DOCUME~1\Boss\LOCALS~1\Temp/ccUpaaaa.o(.text+0x1b87):smooth.c: undefined reference to `glutPostRedisplay'
C:\DOCUME~1\Boss\LOCALS~1\Temp/ccUpaaaa.o(.text+0x1ba1):smooth.c: undefined reference to `gltbMotion'
C:\DOCUME~1\Boss\LOCALS~1\Temp/ccUpaaaa.o(.text+0x1bd2):smooth.c: undefined reference to `_imp__glGetDoublev'
C:\DOCUME~1\Boss\LOCALS~1\Temp/ccUpaaaa.o(.text+0x1beb):smooth.c: undefined reference to `_imp__glGetDoublev'
C:\DOCUME~1\Boss\LOCALS~1\Temp/ccUpaaaa.o(.text+0x1c04):smooth.c: undefined reference to `_imp__glGetIntegerv'
C:\DOCUME~1\Boss\LOCALS~1\Temp/ccUpaaaa.o(.text+0x1c4a):smooth.c: undefined reference to `_imp__gluProject'
C:\DOCUME~1\Boss\LOCALS~1\Temp/ccUpaaaa.o(.text+0x1c98):smooth.c: undefined reference to `_imp__gluUnProject'
C:\DOCUME~1\Boss\LOCALS~1\Temp/ccUpaaaa.o(.text+0x1ca9):smooth.c: undefined reference to `glutPostRedisplay'
C:\DOCUME~1\Boss\LOCALS~1\Temp/ccUpaaaa.o(.text+0x1fa3):smooth.c: undefined reference to `glutInitWindowSize'
C:\DOCUME~1\Boss\LOCALS~1\Temp/ccUpaaaa.o(.text+0x2029):smooth.c: undefined reference to `glutInitDisplayMode'
C:\DOCUME~1\Boss\LOCALS~1\Temp/ccUpaaaa.o(.text+0x2049):smooth.c: undefined reference to `glutReshapeFunc'
C:\DOCUME~1\Boss\LOCALS~1\Temp/ccUpaaaa.o(.text+0x2059):smooth.c: undefined reference to `glutDisplayFunc'
C:\DOCUME~1\Boss\LOCALS~1\Temp/ccUpaaaa.o(.text+0x2069):smooth.c: undefined reference to `glutKeyboardFunc'
C:\DOCUME~1\Boss\LOCALS~1\Temp/ccUpaaaa.o(.text+0x2079):smooth.c: undefined reference to `glutMouseFunc'
C:\DOCUME~1\Boss\LOCALS~1\Temp/ccUpaaaa.o(.text+0x2089):smooth.c: undefined reference to `glutMotionFunc'
C:\DOCUME~1\Boss\LOCALS~1\Temp/ccUpaaaa.o(.text+0x2121):smooth.c: undefined reference to `glutAddMenuEntry'
C:\DOCUME~1\Boss\LOCALS~1\Temp/ccUpaaaa.o(.text+0x2153):smooth.c: undefined reference to `glutAddMenuEntry'
C:\DOCUME~1\Boss\LOCALS~1\Temp/ccUpaaaa.o(.text+0x2165):smooth.c: undefined reference to `glutAddMenuEntry'
C:\DOCUME~1\Boss\LOCALS~1\Temp/ccUpaaaa.o(.text+0x2178):smooth.c: undefined reference to `glutAddSubMenu'
C:\DOCUME~1\Boss\LOCALS~1\Temp/ccUpaaaa.o(.text+0x218a):smooth.c: undefined reference to `glutAddMenuEntry'
C:\DOCUME~1\Boss\LOCALS~1\Temp/ccUpaaaa.o(.text+0x219c):smooth.c: undefined reference to `glutAddMenuEntry'
C:\DOCUME~1\Boss\LOCALS~1\Temp/ccUpaaaa.o(.text+0x21ae):smooth.c: undefined reference to `glutAddMenuEntry'
C:\DOCUME~1\Boss\LOCALS~1\Temp/ccUpaaaa.o(.text+0x21c0):smooth.c: undefined reference to `glutAddMenuEntry'
C:\DOCUME~1\Boss\LOCALS~1\Temp/ccUpaaaa.o(.text+0x21d2):smooth.c: undefined reference to `glutAddMenuEntry'
C:\DOCUME~1\Boss\LOCALS~1\Temp/ccUpaaaa.o(.text+0x21e4):smooth.c: more undefined references to `glutAddMenuEntry' follow
C:\DOCUME~1\Boss\LOCALS~1\Temp/ccUpaaaa.o(.text+0x22db):smooth.c: undefined reference to `glutAttachMenu'
C:\DOCUME~1\Boss\LOCALS~1\Temp/ccUpaaaa.o(.text+0x22e8):smooth.c: undefined reference to `glutMainLoop'
Execution terminated
<!--c2--></td></tr></table><div class='postcolor'><!--ec2-->
P.S. CS 318? Garland?
Open C++
Click "Project" from the top tab.
Click "Settings" in the "Project" tab.
Click "Link"
Under "Object/Library Modules" you'll want to add the names of the .lib files you want to include.
Then you should probably restart Dev C++ and go from there.
If it doesn't work....er... don't blame me, I'm still playing with "if"
statements :-/
[log] <!--QuoteEnd--> </td></tr></table><div class='postcolor'> <!--QuoteEEnd-->
Great <!--emo&:)--><img src='http://www.unknownworlds.com/forums/html//emoticons/smile.gif' border='0' style='vertical-align:middle' alt='smile.gif' /><!--endemo-->
Well, it definately is a linker error.
The really interesting line is the call to the compiler:
<!--QuoteBegin--></div><table border='0' align='center' width='95%' cellpadding='3' cellspacing='1'><tr><td><b>QUOTE</b> </td></tr><tr><td id='QUOTE'><!--QuoteEBegin-->gcc.exe "C:\Documents and Settings\Boss\Desktop\Old desktop\591final\smooth.c" -o "C:\Documents and Settings\Boss\Desktop\Old desktop\591final\smooth.exe" -I"I:\Program Files\Dev-Cpp\include" -L"I:\Program Files\Dev-Cpp\lib"<!--QuoteEnd--></td></tr></table><div class='postcolor'><!--QuoteEEnd-->
The library files that are being included are coming from <span style='font-family:Courier'>I:\Program Files\Dev-Cpp\lib</span> only. So if the GLUT library files are not in there, they simply aren't being linked in. If they are in there, it might be worth a shot adding them each explicitly to the compilation:
Go to project->project options at the menu. You'll get a dialog box pop up. Click on the Parameters tab. The text box labelled "Linker" contains the libraries you're passing to the linker as parameters (I don't know whether the contents of the box is the actual invocation syntax). Anyway, use the "Add Library or Object" button, browse to the GLUT libraries and add them.
Now, that may not help (or it may help and you then get dll errors) because typically libraries with the ".lib" extension tend to be for MSVC++, and there's a good chance that Dev-Cpp's compiler won't be able to use them (or won't be able to use them properly). Dev-Cpp libraries typically have the ".a" extension.
Fortunately, there are downloadable "Dev Packs" that are pretty much libraries which Dev-Cpp can use. I'm pretty sure there's an OpenGL one. You can get them by going to "Tools"->"Check for Updates/Packages" at the menu.
The thing about libraries ending in ".lib" is that sometimes they work, sometimes they don't work, sometimes you need combinations of the .libs and .as for no logical reason.
Basically, if manually adding the libraries to the linker parameters doesn't work, try downloading the OpenGL Dev-Pack and use those libraries instead. If that doesn't work, try a combination of .as and .libs.
<!--c1--></div><table border='0' align='center' width='95%' cellpadding='3' cellspacing='1'><tr><td><b>CODE</b> </td></tr><tr><td id='CODE'><!--ec1-->Compiler: Default compiler
Building Makefile: "I:\Program Files\Dev-Cpp\Makefile.win"
Executing make...
make.exe -f "I:\Program Files\Dev-Cpp\Makefile.win" all
I:\Program Files\Dev-Cpp\Makefile.win:25: *** multiple target patterns. Stop.
Execution terminated
<!--c2--></td></tr></table><div class='postcolor'><!--ec2-->
and heres makefile.win, with emphasis on line 25 and line 9 (which i think is the real problem):
<!--QuoteBegin--></div><table border='0' align='center' width='95%' cellpadding='3' cellspacing='1'><tr><td><b>QUOTE</b> </td></tr><tr><td id='QUOTE'><!--QuoteEBegin-->
# Project: Project1
# Makefile created by Dev-C++ 4.9.8.0
CPP = g++.exe
CC = gcc.exe
WINDRES = windres.exe
RES =
OBJ = "C:/Documents and Settings/Boss/Desktop/Old desktop/591final/glm.o" "C:/Documents and Settings/Boss/Desktop/Old desktop/591final/gltb.o" "C:/Documents and Settings/Boss/Desktop/Old desktop/591final/smooth.o" $(RES)
<b><i>LINKOBJ = "C:/Documents and Settings/Boss/Desktop/Old desktop/591final/glm.o" "C:/Documents and Settings/Boss/Desktop/Old desktop/591final/gltb.o" "C:/Documents and Settings/Boss/Desktop/Old desktop/591final/smooth.o" $(RES)</i></b>
LIBS = -L"I:/Program Files/Dev-Cpp/lib" "C:/Documents and Settings/Boss/Desktop/Old desktop/591final/glut-3.7.6-bin/glut32.lib" "C:/Documents and Settings/Boss/Desktop/Old desktop/591final/opengl/GLAUX.LIB" "C:/Documents and Settings/Boss/Desktop/Old desktop/591final/opengl/GLU32.LIB" "C:/Documents and Settings/Boss/Desktop/Old desktop/591final/opengl/OPENGL32.LIB"
INCS = -I"I:/Program Files/Dev-Cpp/include"
CXXINCS = -I"I:/Program Files/Dev-Cpp/include/c++" -I"I:/Program Files/Dev-Cpp/include/c++/mingw32" -I"I:/Program Files/Dev-Cpp/include/c++/backward" -I"I:/Program Files/Dev-Cpp/include"
BIN = Project1.exe
CXXFLAGS = $(CXXINCS)
CFLAGS = $(INCS)
.PHONY: all all-before all-after clean clean-custom
all: all-before Project1.exe all-after
clean: clean-custom
rm -f $(OBJ) $(BIN)
<b><i>$(BIN): $(LINKOBJ)</i></b>
$(CPP) $(LINKOBJ) -o "Project1.exe" $(LIBS)
"C:/Documents and Settings/Boss/Desktop/Old desktop/591final/glm.o": C:/Documents\ and\ Settings/Boss/Desktop/Old\ desktop/591final/glm.c
$(CPP) -c "C:/Documents and Settings/Boss/Desktop/Old desktop/591final/glm.c" -o "C:/Documents and Settings/Boss/Desktop/Old desktop/591final/glm.o" $(CXXFLAGS)
"C:/Documents and Settings/Boss/Desktop/Old desktop/591final/gltb.o": C:/Documents\ and\ Settings/Boss/Desktop/Old\ desktop/591final/gltb.c
$(CPP) -c "C:/Documents and Settings/Boss/Desktop/Old desktop/591final/gltb.c" -o "C:/Documents and Settings/Boss/Desktop/Old desktop/591final/gltb.o" $(CXXFLAGS)
"C:/Documents and Settings/Boss/Desktop/Old desktop/591final/smooth.o": C:/Documents\ and\ Settings/Boss/Desktop/Old\ desktop/591final/smooth.c
$(CPP) -c "C:/Documents and Settings/Boss/Desktop/Old desktop/591final/smooth.c" -o "C:/Documents and Settings/Boss/Desktop/Old desktop/591final/smooth.o" $(CXXFLAGS)<!--QuoteEnd--></td></tr></table><div class='postcolor'><!--QuoteEEnd-->