• Advertisement
Sign in to follow this  

C::B and GLUT......

This topic is 3836 days old which is more than the 365 day threshold we allow for new replies. Please post a new topic.

If you intended to correct an error in the post then please contact us.

Recommended Posts

Got openGL, but most tutorials (that I've found) seem to require GLUT. In the GLUT readme, it says to use microsoft developer 6. I am using C::B and cannot even find anything to compile from, per instructions (glut.dsw is not recognised in C::B). Is this related to the use of the compiler? In the compiler options it says I am using the gnu gcc, and also I have mingw. Not quite sure on the relationship between these 2 files (file clusters). Has anyone else put GLUT onto C::B? If so, was it easy, or did similar issues ensue? (feel like im having to build a hammer to nail a plank, but at least it'll be MY hammer!)

Share this post

Link to post
Share on other sites
was trying that. Was getting no GLUT project option. I thought I had Mingw, but seems on further investigation, I have mingw32 as part of codeblocks. Dont quite know the difference, but I just installed Mingw and followed directions, still have no GLUT project options, and the files in my Mingw file seem the same as in codeblocks. I tried using this (fog) as a test file: http://www.xmission.com/~nate/tutors.html (using openGL project type. Do I have to specify it as a GLUT project for it to work?)

Compiling: C:\Code\Projects\tutorials\tutor\fog.c
C:\Code\Projects\tutorials\tutor\fog.c: In function `main':
C:\Code\Projects\tutorials\tutor\fog.c:481: warning: passing arg 1 of `glutKeyboardFunc' from incompatible pointer type
C:\Code\Projects\tutorials\tutor\fog.c:486: warning: passing arg 1 of `glutKeyboardFunc' from incompatible pointer type
C:\Code\Projects\tutorials\tutor\fog.c:491: warning: passing arg 1 of `glutKeyboardFunc' from incompatible pointer type
C:\Code\Projects\tutorials\tutor\fog.c:509: warning: passing arg 1 of `glutKeyboardFunc' from incompatible pointer type
Linking console executable: C:\Code\Projects\tutorials\tutor\fog.exe
C:\Code\Projects\tutorials\tutor\fog.o:fog.c:(.text+0x1c): undefined reference to `__glutInitWithExit@12'
C:\Code\Projects\tutorials\tutor\fog.o:fog.c:(.text+0x3c): undefined reference to `__glutCreateWindowWithExit@8'
C:\Code\Projects\tutorials\tutor\fog.o:fog.c:(.text+0x5c): undefined reference to `__glutCreateMenuWithExit@8'
C:\Code\Projects\tutorials\tutor\fog.o:fog.c:(.text+0x16b): undefined reference to `glRasterPos2i@8'
C:\Code\Projects\tutorials\tutor\fog.o:fog.c:(.text+0x19f): undefined reference to `glutBitmapCharacter@8'
C:\Code\Projects\tutorials\tutor\fog.o:fog.c:(.text+0x1d0): undefined reference to `glColor3ub@12'
C:\Code\Projects\tutorials\tutor\fog.o:fog.c:(.text+0x1fc): undefined reference to `glColor3ub@12'
C:\Code\Projects\tutorials\tutor\fog.o:fog.c:(.text+0x239): undefined reference to `glColor3ub@12'
C:\Code\Projects\tutorials\tutor\fog.o:fog.c:(.text+0x383): undefined reference to `glmReadOBJ'
C:\Code\Projects\tutorials\tutor\fog.o:fog.c:(.text+0x3aa): undefined reference to `glmUnitize'
C:\Code\Projects\tutorials\tutor\fog.o:fog.c:(.text+0x3b9): undefined reference to `glmFacetNormals'
C:\Code\Projects\tutorials\tutor\fog.o:fog.c:(.text+0x3cf): undefined reference to `glmVertexNormals'
C:\Code\Projects\tutorials\tutor\fog.o:fog.c:(.text+0x3e4): undefined reference to `glmDraw'
C:\Code\Projects\tutorials\tutor\fog.o:fog.c:(.text+0x40e): undefined reference to `glViewport@16'
C:\Code\Projects\tutorials\tutor\fog.o:fog.c:(.text+0x41d): undefined reference to `glMatrixMode@4'
C:\Code\Projects\tutorials\tutor\fog.o:fog.c:(.text+0x425): undefined reference to `glLoadIdentity@0'
C:\Code\Projects\tutorials\tutor\fog.o:fog.c:(.text+0x443): undefined reference to `gluOrtho2D@32'
C:\Code\Projects\tutorials\tutor\fog.o:fog.c:(.text+0xc7d): undefined reference to `glmVertexNormals'
C:\Code\Projects\tutorials\tutor\fog.o:fog.c:(.text+0xcac): undefined reference to `glViewport@16'
C:\Code\Projects\tutorials\tutor\fog.o:fog.c:(.text+0xcbb): undefined reference to `glMatrixMode@4'
C:\Code\Projects\tutorials\tutor\fog.o:fog.c:(.text+0xcc3): undefined reference to `glLoadIdentity@0'

C:\Code\Projects\tutorials\tutor\fog.o:fog.c:(.text+0x11f8): undefined reference to `glutSetWindow@4'
C:\Code\Projects\tutorials\tutor\fog.o:fog.c:(.text+0x1200): undefined reference to `glutPostRedisplay@0'
C:\Code\Projects\tutorials\tutor\fog.o:fog.c:(.text+0x120d): undefined reference to `glutSetWindow@4'
C:\Code\Projects\tutorials\tutor\fog.o:fog.c:(.text+0x122b): undefined reference to `glutPostRedisplay@0'
C:\Code\Projects\tutorials\tutor\fog.o:fog.c:(.text+0x1238): undefined reference to `glutSetWindow@4'
C:\Code\Projects\tutorials\tutor\fog.o:fog.c:(.text+0x1256): undefined reference to `glutPostRedisplay@0'
C:\Code\Projects\tutorials\tutor\fog.o:fog.c:(.text+0x128e): undefined reference to `glutInitDisplayMode@4'
C:\Code\Projects\tutorials\tutor\fog.o:fog.c:(.text+0x1374): undefined reference to `glutKeyboardFunc@4'

C:\Code\Projects\tutorials\tutor\fog.o:fog.c:(.text+0x146f): more undefined references to `glutAddMenuEntry@8' follow

collect2: ld returned 1 exit status
Process terminated with status 1 (0 minutes, 9 seconds)
0 errors, 4 warnings

above has lots more lines of same cut out for size. I found I'm missing a header glm.h, and tried this one: http://www.koders.com/c/fid4FAE66887CD95175915B4186E363E1B4E29D8839.aspx but to no avail.

Share this post

Link to post
Share on other sites

a: fixing libs
b: editing glut.h with this patch #define GLUT_DISABLE_ATEXIT_HACK (found in forum)
c: changing (unsigned char) to (char) in glut.h (found this one myself! is it possible to sign a char??-yes, i think i need to sleep......)

I have this:

Compiling: C:\Code\Projects\tutorials\tutor\fog.c
Linking console executable: C:\Code\Projects\tutorials\tutor\fog.exe
C:\Code\Projects\tutorials\tutor\fog.o:fog.c:(.text+0x31c): undefined reference to `glmReadOBJ'
C:\Code\Projects\tutorials\tutor\fog.o:fog.c:(.text+0x343): undefined reference to `glmUnitize'
C:\Code\Projects\tutorials\tutor\fog.o:fog.c:(.text+0x352): undefined reference to `glmFacetNormals'
C:\Code\Projects\tutorials\tutor\fog.o:fog.c:(.text+0x368): undefined reference to `glmVertexNormals'
C:\Code\Projects\tutorials\tutor\fog.o:fog.c:(.text+0x37d): undefined reference to `glmDraw'
C:\Code\Projects\tutorials\tutor\fog.o:fog.c:(.text+0xbca): undefined reference to `glmReadOBJ'
C:\Code\Projects\tutorials\tutor\fog.o:fog.c:(.text+0xbf1): undefined reference to `glmUnitize'
C:\Code\Projects\tutorials\tutor\fog.o:fog.c:(.text+0xc00): undefined reference to `glmFacetNormals'
C:\Code\Projects\tutorials\tutor\fog.o:fog.c:(.text+0xc16): undefined reference to `glmVertexNormals'
collect2: ld returned 1 exit status
Process terminated with status 1 (0 minutes, 5 seconds)
0 errors, 0 warnings

I think at this point I should seriosly be worried about the effect of bush mechanics on code, but I seem to be closer......

Share this post

Link to post
Share on other sites
It looks like whatever tutorial you're using uses the glm library. I found a reference to it here, but while that page has a link to the glm author's site, I can't find an actual download link for glm. I did find a glm library for perl here, but that won't help you.

I don't know much about the glm library, but it looks like you're failing to link with some glm library. Sorry I can't help you more.

By the way, what tutorials are you following?

Share this post

Link to post
Share on other sites
Sign in to follow this  

  • Advertisement