User forums > Help

Code Blocks Error Message with GLUT

(1/5) > >>

studiox:
Hi

I am very new to all this, so please bare with me.  We use Visual Studio.NET at school for C++ programs linked with all the openGL lib and stuff, I need an editor for home so i can compile my work, that is why i got Code Blocks and i need to configure it.  I am getting this error message when i compile my prog:

C:/Program Files/CodeBlocks/include/GL/glut.h:50: error: redeclaration of C++ built-in type `short'

I have no clue what this means, any ideas.  Also, how do i link/configure with Code Blocks the openGL lib?

thanks!

studiox:
Also, 1 more thing i just realized.  When i build, i get this message

Linking executable: C:\_Courses\CPS511 - Graphics\Lab3\Lab3.exe
.objs\lab.o:lab.cpp:(.text+0x77d): undefined reference to `_imp__gluOrtho2D'
.objs\lab.o:lab.cpp:(.text+0x7be): undefined reference to `glutInit'
.objs\lab.o:lab.cpp:(.text+0x7ca): undefined reference to `glutInitDisplayMode'
.objs\lab.o:lab.cpp:(.text+0x7de): undefined reference to `glutInitWindowSize'
.objs\lab.o:lab.cpp:(.text+0x7f2): undefined reference to `glutInitWindowPosition'
.objs\lab.o:lab.cpp:(.text+0x7fe): undefined reference to `glutCreateWindow'
.objs\lab.o:lab.cpp:(.text+0x80a): undefined reference to `glutDisplayFunc'
.objs\lab.o:lab.cpp:(.text+0x816): undefined reference to `glutMouseFunc'
.objs\lab.o:lab.cpp:(.text+0x820): undefined reference to `glutMainLoop'
collect2: ld returned 1 exit status
Process terminated with status 1 (0 minutes, 0 seconds)
0 errors, 0 warnings
 

studiox:
okay, figure it out, it was linking lib issues with glu, glut & openGL.

Now i have one new problem.  It builds fine, but when i "compile & run" i get an error pop up box saying
"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?

pls help, i really wanna try this editor!

mandrav:
Unfortunately, glut support in MinGW is not complete. But if you search a bit, you can find it online.
Take a look here.

himaja:

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.

Navigation

[0] Message Index

[#] Next page

Go to full version