I just started working with Dev-c++ and I'm having trouble getting it to work with GLUI. After checking out this forum, I was able to make it work with GLUT, but only in C mode (not C++), and I can't get it to work with GLUI at all. I would really appreciate some help with this.
I'm using Windows Vista Home Premium
I'm using Dev-C++ version 4.9.9.2
The only GLUI code I added to my working GLUT code was #include <GL/glui.h>
My compiler log is as follows:
In file included from main.c:2:
C:/Dev-Cpp/include/GL/glui.h:30:19: cstdlib: No such file or directory
C:/Dev-Cpp/include/GL/glui.h:31:18: cstdio: No such file or directory
C:/Dev-Cpp/include/GL/glui.h:32:19: cstring: No such file or directory
In file included from main.c:2:
C:/Dev-Cpp/include/GL/glui.h:40: error: syntax error before "Arcball"
C:/Dev-Cpp/include/GL/glui.h:40: warning: data definition has no type or storage class
C:/Dev-Cpp/include/GL/glui.h:53: error: syntax error before "RGBc"
C:/Dev-Cpp/include/GL/glui.h:53: error: syntax error before '{' token
..... (A bunch more errors, I won't bother including the whole list here)
Any help would be very much appreciated.
Thanks,
--Steph
If you would like to refer to this comment somewhere else in this project, copy and paste the following link:
Just in case anyone else has the same problems, this is what my compiler commands are: -mms-bitfields -lglut32 -lopengl32 -lglu32 -lglui -lwinmm
and my linker commands: -fnative-struct -lglut32 -lopengl32 -lglu32 -lglui -lwinmm
Thanks for all the help!
--Steph
If you would like to refer to this comment somewhere else in this project, copy and paste the following link:
As you mentioned earlier, you have issues compiling C++ code. The headers
that it is not finding are C++ headers.
You will probably need to work with your paths in the IDE to get the
header and library directories added correctly, in much the same way
as you did for the C stuff.
Wayne
If you would like to refer to this comment somewhere else in this project, copy and paste the following link:
That's what I expected, but I'm not sure what to change exactly. This is what I get when I try to compile it as C++ code, and was having the same errors without the GLUI include (just with GLUT):
C:/Dev-Cpp/lib/libglut32.a(glut_win.o)(.text+0x631):glut_win.c: undefined reference to ChoosePixelFormat@8'
C:/Dev-Cpp/lib/libglut32.a(glut_win.o)(.text+0x64a):glut_win.c: undefined reference toSetPixelFormat@12'
C:/Dev-Cpp/lib/libglut32.a(win32_menu.o)(.text+0x4a7):win32_menu.c: undefined reference to `GdiFlush@0'
... (more errors of similar nature)
Thanks again,
--Steph
If you would like to refer to this comment somewhere else in this project, copy and paste the following link:
You are compiling with an option -mngo-cygwin that makes no sense for
compiling under mingw - it is an option one uses when compiling under
cygwin and telling it to not use cygwin1.dll
Wayne
If you would like to refer to this comment somewhere else in this project, copy and paste the following link:
Thanks. I got the compile codes from other posts on this forum to get GLUT to work in C mode, so I'm not sure which are needed and which aren't. I've removed that one, but I'm still having the same problems.
I think you have an issue with the order in which you are linking you graphics libraries.
I don't remember (and am stuck in a place I can't check) what the right order is, but
play around with the order of glut32, opengl32 and glu32 - it may fix things.
You have a LOT of libraries linked, gtk, gdk, pango, and some things I am not even
sure what they are - like the mno-cygwin, they probably are not causing problems,
but they would be better not there.
Wayne
If you would like to refer to this comment somewhere else in this project, copy and paste the following link:
Playing around with them changes the order of the errors, but no luck in fixing the problem. When you are able to get home and check on the order they should be linked in, I would really appreciate it. Which are the libraries that are needed and which ones are not? If you could post what I should have under the compiler and linker command options, that would be of great help.
Thanks so much for troubleshooting this with me :)
--Steph
If you would like to refer to this comment somewhere else in this project, copy and paste the following link:
Hi,
I just started working with Dev-c++ and I'm having trouble getting it to work with GLUI. After checking out this forum, I was able to make it work with GLUT, but only in C mode (not C++), and I can't get it to work with GLUI at all. I would really appreciate some help with this.
I'm using Windows Vista Home Premium
I'm using Dev-C++ version 4.9.9.2
The only GLUI code I added to my working GLUT code was #include <GL/glui.h>
My compiler log is as follows:
Compiler: Default compiler
Building Makefile: "C:\Dev-Cpp\Projects\GUI\Makefile.win"
Executing make...
c:\dev-cpp\bin\make.exe -f "C:\Dev-Cpp\Projects\GUI\Makefile.win" all
c:\dev-cpp\bin\gcc.exe -c main.c -o main.o -I"C:/Dev-Cpp/include" -I"C:/Dev-Cpp/lib/gcc/mingw32/3.4.2/include" -I"C:/Dev-Cpp/include/gtk-2.0" -I"C:/Dev-Cpp/include/glib-2.0" -I"C:/Dev-Cpp/lib/gtk-2.0/include" -I"C:/Dev-Cpp/lib/glib-2.0/include" -I"C:/Dev-Cpp/include/atk-1.0" -I"C:/Dev-Cpp/include/pango-1.0" -I"C:/Dev-Cpp/include/GL" -I"C:\Dev-Cpp\include\gtk-2.0" -I"C:\Dev-Cpp\include..\lib\gtk-2.0\include" -I"C:\Dev-Cpp\include\atk-1.0" -I"C:\Dev-Cpp\include\pango-1.0" -I"C:\Dev-Cpp\include\glib-2.0" -I"C:\Dev-Cpp\include..\lib\glib-2.0\include" -mms-bitfields -I"C:\Dev-Cpp\include\gtkdeps-2.0" -I"C:\Dev-Cpp\lib\gtk-2.0\include" -I"C:\Dev-Cpp\include\atk-1.0" -I"C:\Dev-Cpp\include\pango-1.0" -I"C:\Dev-Cpp\include\glib-2.0" -I"C:\Dev-Cpp\lib\glib-2.0" -I"C:\Dev-Cpp\lib\glib-2.0\include" -mms-bitfields -lglui -lglut32 -lopengl32 -lglu32 -lwinmm
In file included from main.c:2:
C:/Dev-Cpp/include/GL/glui.h:30:19: cstdlib: No such file or directory
C:/Dev-Cpp/include/GL/glui.h:31:18: cstdio: No such file or directory
C:/Dev-Cpp/include/GL/glui.h:32:19: cstring: No such file or directory
In file included from main.c:2:
C:/Dev-Cpp/include/GL/glui.h:40: error: syntax error before "Arcball"
C:/Dev-Cpp/include/GL/glui.h:40: warning: data definition has no type or storage class
C:/Dev-Cpp/include/GL/glui.h:53: error: syntax error before "RGBc"
C:/Dev-Cpp/include/GL/glui.h:53: error: syntax error before '{' token
..... (A bunch more errors, I won't bother including the whole list here)
Any help would be very much appreciated.
Thanks,
--Steph
Any news of this issue?
--Steph
I got to work finally :)
Just in case anyone else has the same problems, this is what my compiler commands are: -mms-bitfields -lglut32 -lopengl32 -lglu32 -lglui -lwinmm
and my linker commands: -fnative-struct -lglut32 -lopengl32 -lglu32 -lglui -lwinmm
Thanks for all the help!
--Steph
Well, your results seem consistent.
As you mentioned earlier, you have issues compiling C++ code. The headers
that it is not finding are C++ headers.
You will probably need to work with your paths in the IDE to get the
header and library directories added correctly, in much the same way
as you did for the C stuff.
Wayne
That's what I expected, but I'm not sure what to change exactly. This is what I get when I try to compile it as C++ code, and was having the same errors without the GLUI include (just with GLUT):
Compiler: Default compiler
Building Makefile: "C:\Dev-Cpp\Projects\Makefile.win"
Executing make...
c:\dev-cpp\bin\make.exe -f "C:\Dev-Cpp\Projects\Makefile.win" all
c:\dev-cpp\bin\g++.exe -D__DEBUG__ test.o -o "Project1.exe" -L"C:/Dev-Cpp/lib" -lgtk-win32-2.0 -lgdk-win32-2.0 -limm32 -lshell32 -lole32 -luuid -latk-1.0 -lgdk_pixbuf-2.0 -lm -lpangowin32-1.0 -lgdi32 -lpango-1.0 -lgobject-2.0 -lgmodule-2.0 -lglib-2.0 -mno-cygwin -fnative-struct -lglui -lglut32 -lopengl32 -lglu32 -lwinmm -g3
C:/Dev-Cpp/lib/libglut32.a(glut_win.o)(.text+0x631):glut_win.c: undefined reference to
ChoosePixelFormat@8' C:/Dev-Cpp/lib/libglut32.a(glut_win.o)(.text+0x64a):glut_win.c: undefined reference to
SetPixelFormat@12'C:/Dev-Cpp/lib/libglut32.a(win32_menu.o)(.text+0x4a7):win32_menu.c: undefined reference to `GdiFlush@0'
... (more errors of similar nature)
Thanks again,
--Steph
I have a silly question - are you using Dev-C++ with Cygwin?
Wayne
No, not to my knowledge anyway lol. Just running it as a standard windows app.
--Steph
You are compiling with an option -mngo-cygwin that makes no sense for
compiling under mingw - it is an option one uses when compiling under
cygwin and telling it to not use cygwin1.dll
Wayne
Thanks. I got the compile codes from other posts on this forum to get GLUT to work in C mode, so I'm not sure which are needed and which aren't. I've removed that one, but I'm still having the same problems.
New compiler log in C++ mode:
Compiler: Default compiler
Building Makefile: "C:\Dev-Cpp\Projects\Makefile.win"
Executing make...
c:\dev-cpp\bin\make.exe -f "C:\Dev-Cpp\Projects\Makefile.win" all
c:\dev-cpp\bin\g++.exe -D__DEBUG__ test.o -o "Project1.exe" -L"C:/Dev-Cpp/lib" -lgtk-win32-2.0 -lgdk-win32-2.0 -limm32 -lshell32 -lole32 -luuid -latk-1.0 -lgdk_pixbuf-2.0 -lm -lpangowin32-1.0 -lgdi32 -lpango-1.0 -lgobject-2.0 -lgmodule-2.0 -lglib-2.0 -fnative-struct -lglui -lglut32 -lopengl32 -lglu32 -lwinmm -g3
C:/Dev-Cpp/lib/libglut32.a(glut_win.o)(.text+0x631):glut_win.c: undefined reference to
ChoosePixelFormat@8' C:/Dev-Cpp/lib/libglut32.a(glut_win.o)(.text+0x64a):glut_win.c: undefined reference to
SetPixelFormat@12'C:/Dev-Cpp/lib/libglut32.a(win32_menu.o)(.text+0x4a7):win32_menu.c: undefined reference to
GdiFlush@0' C:/Dev-Cpp/lib/libglut32.a(win32_x11.o)(.text+0x1f):win32_x11.c: undefined reference to
GetPixelFormat@4'C:/Dev-Cpp/lib/libglut32.a(win32_x11.o)(.text+0x44):win32_x11.c: undefined reference to
DescribePixelFormat@16' C:/Dev-Cpp/lib/libglut32.a(win32_x11.o)(.text+0xc0):win32_x11.c: undefined reference to
GetSystemPaletteEntries@16'C:/Dev-Cpp/lib/libglut32.a(win32_x11.o)(.text+0x374):win32_x11.c: undefined reference to `CreatePalette@4'
... more errors....
Thanks,
--Steph
I think you have an issue with the order in which you are linking you graphics libraries.
I don't remember (and am stuck in a place I can't check) what the right order is, but
play around with the order of glut32, opengl32 and glu32 - it may fix things.
You have a LOT of libraries linked, gtk, gdk, pango, and some things I am not even
sure what they are - like the mno-cygwin, they probably are not causing problems,
but they would be better not there.
Wayne
Playing around with them changes the order of the errors, but no luck in fixing the problem. When you are able to get home and check on the order they should be linked in, I would really appreciate it. Which are the libraries that are needed and which ones are not? If you could post what I should have under the compiler and linker command options, that would be of great help.
Thanks so much for troubleshooting this with me :)
--Steph
Were you able to check the order for me Wayne?
Thanks,
--Steph