User forums > Using Code::Blocks
new project wizard - GLUT - problems defining $(#glut)
MortenMacFly:
--- Quote from: Freak on April 15, 2008, 11:58:26 am ---I can use the OpenGL and other wizards, bit i cannot get a GLUT project to create on Windows.
--- End quote ---
OpenGL ships with the MinGW compiler suite. GLUT does not. Are you sure you installed a GLUT development package somewhere? Are you sure you really do have glut.h in the folder(s) you are pointing to?
Keep in mind: Even the MinGW bundled setup of C::B 08.02 does not ship with GLUT. This library is an additional download.
achandran:
I got the same problem with Freak and I also use CodeBlocks 8.02
I have downloaded glut-3.7.6-bin and extracted it to C:\glut-3.7.6-bin
Because the archive didn't use folder include and lib, I made folder include and lib in C:\glut-3.7.6-bin, so I have
- C:\glut-3.7.6-bin\include
- C:\glut-3.7.6-bin\lib
Then I copied glut.h to C:\glut-3.7.6-bin\include and glut32.lib to C:\glut-3.7.6-bin\lib.
I didn't delete the original file, so I have C:\glut-3.7.6-bin\glut.h and C:\glut-3.7.6-bin\include\glut.h
With that setting, when I used Wizard , CodeBlocks still couldn't found them
If I set base field of Global Variable glut to
C:\glut-3.7.6-bin
CodeBlocks would said
The macro you entered seems valid, but this wizard can't
locate the include directory based on this macro.
This wizard cannot continue.
If I set base field of Global Variable glut to
C:\glut-3.7.6-bin\include
CodeBlocks would said
The macro you entered seems valid, but this wizard can't
locate the include directory based on this macro.
This wizard cannot continue.
Thanks for helps
Jenna:
Try the "GLUT for Mingw32" from here.
You have to put "_WCHAR_T_DEFINED" in your projects "Build options" ("#defines"-tab), or you get an error because of a redefined "wchar_t" (alternatively you can comment out the line that 45 causes the error in "glut.h").
You have to copy glut32.dll in your windows search-path, and you can build and run the wizard-example (after setting the "glut" global-variable to the new patch of course).
achandran:
Thanks, it helped a lot
Actually after i looked at "GLUT for Mingw32" zip file, i got an idea and i copied
glut.h in my previous configuration to C:\glut-3.7.6-bin\include\GL\glut.h not
C:\glut-3.7.6-bin\include\glut.h and it worked.
It seems that the template need glut.h in "include\GL" not in "include"
Navigation
[0] Message Index
[*] Previous page
Go to full version