User forums > Help
Code Blocks Error Message with GLUT
rickg22:
have you tried using the VCToolkit compiler instead of MinGW? (warning: Needs previous installation of the Windows SDK, too!)
thomas:
--- Quote from: studiox on October 02, 2005, 05:55:13 am ---"The dynamic link library glut32.dll could not be found in C:\................................."very long file path which starts with where my cpp file sits and adds all these others weird C:\ paths to it. What is wrong now?
--- End quote ---
That means you have to either copy the dll into the same directory where your program is (happens to be your project folder), or anywhere in your PATH so the system can find it (most people use C:\windows or C:\windows\system32 for that matter).
--- Quote from: studiox on October 02, 2005, 05:55:13 am ---"C:/Program Files/CodeBlocks/include/GL/glut.h:50: error: redeclaration of C++ built-in type `short'"
--- End quote ---
I don't get that kind of error, but I don't use the glut.h from MinGW. You can get everything related to GLUT from Nate Robin's site: http://www.xmission.com/~nate/glut.html (header, libraries, sources, everything).
rickg22:
Do you think we should contact the site author so he can testdrive codeblocks? :D
Hey, maybe we could make a codeblocks workspace for the glut! :)
studiox:
--- Quote from: himaja on October 04, 2005, 07:34:42 pm ---
Hi,
I am having the same problem with linking with GLUT, could you tell me how you fixed this error??
"C:/Program Files/CodeBlocks/include/GL/glut.h:50: error: redeclaration of C++ built-in type `short'"
Thanks,
Himaja.
--- End quote ---
To fix that error i had to put all the right files in all the right directories.
1)glut.h, gl.h and glu.h must be the codeblocks/include/GL directory
2)glu32.lib, glut32.lib and opengl32.lib must be in the codeblocks/lib directory
3)glu32.dll, glut.dll and opengl32.dll must be in the WINNT/ServicePackFiles/i386 directory
now after that is done, you have to set the path to those files in the codeblocks editor. Open the codeblocks editor and open your file/project.
1)click "Project -> Build Options", click the "Linker" tab
2)In the Link Libraries box, add the path to all the *.lib & *.dll files listed above, so there will be 6 paths you will add
3)In the other linker options, add this code, exactly as it is below:
-lglut32
-lopengl32
-lglu32
....then click OK...
4)click "Compiler -> Compiler options", click "Linker" tab
6)add the path to the 3 *.dll files
7)add this again to the "other linker options box"
-lglut32
-lopengl32
-lglu32
that should do it
studiox:
--- Quote from: thomas on October 04, 2005, 11:13:45 pm ---
--- Quote from: studiox on October 02, 2005, 05:55:13 am ---"The dynamic link library glut32.dll could not be found in C:\................................."very long file path which starts with where my cpp file sits and adds all these others weird C:\ paths to it. What is wrong now?
--- End quote ---
That means you have to either copy the dll into the same directory where your program is (happens to be your project folder), or anywhere in your PATH so the system can find it (most people use C:\windows or C:\windows\system32 for that matter).
--- End quote ---
I have copied the DLL to the same directory. Now when i compile and run, i don't but that error anymore, but now it seems to crash. I the the message, my application has generated errors and will be closed by windows, an error report is being created. Whats the deal with that now?
Navigation
[0] Message Index
[#] Next page
[*] Previous page
Go to full version