Glui, Windows, mingw32

I've been developing a computer simulation in C using glut and opengl for linux and windows. I've gotten to the point where I would like to add glui for ui stuff.

My program compiled on linux and windows using gcc and mingw32-gcc
using a command like

gcc -o aberration -Wall aberration.c -mwindows glut32.lib -lopengl32 -lglu32

before I added glui.

I've added glui and been able to compile on linux using

g++ -o aberration -Wall aberration.c -lX11 -lXi -lXmu -lglui -lglut -lGl -lGLU

using this set up
glut.h: /usr/include/GL/glut.h
libglut.a: /usr/lib/libglut.a
glui.h: /usr/include/GL/glui.h
libglui.a: /usr/lib/libglui.a

On Windows I have this set up:
glut32.lib: source directory
glut.h: MinGWincludeGL
glut32.dll: C:WINDOWSsystem32

I've added glui.h in the source directory and glui32.lib and libglui.a into MinGWincludelib

I've tried a lot of different set ups and compile statements
ex:
g++ -O2 aberration.cpp -o aberration -Wall -mwindows glui32.lib glut32.lib -lglui32 -lglut32 -lglu32 -lopengl32

to no avail. I can't get this to compile on Windows using mingw32 which is a bummer. Any suggestions?



error type:

C:Documents and SettingsCompaq_OwnerDesktop
royal - aberration>g++ -O2 aberr
ation.cpp -o aberration -Wall -mwindows glui32.lib glut32.lib -lglui32 -lglut32
-lglu32 -lopengl32
In file included from aberration.cpp:8:
glui.h:69: warning: ignoring #pragma comment
aberration.cpp:11: warning: ignoring #pragma comment
aberration.cpp:71: warning: converting to `unsigned int' from `double'
aberration.cpp: In function `void headsUpDisplay()':
aberration.cpp:141: warning: converting to `int' from `long double'
aberration.cpp:146: warning: converting to `int' from `double'
aberration.cpp: In function `void overheadDisplay()':
aberration.cpp:177: warning: converting to `int' from `long double'
aberration.cpp:178: warning: converting to `int' from `float'
aberration.cpp:178: warning: converting to `int' from `float'
aberration.cpp:178: warning: converting to `int' from `float'
aberration.cpp: In function `void renderScene()':
aberration.cpp:303: warning: converting to `int' from `long double'
aberration.cpp:304: warning: converting to `int' from `float'
aberration.cpp:304: warning: converting to `int' from `float'
aberration.cpp:304: warning: converting to `int' from `float'
aberration.cpp:325: warning: converting to `int' from `long double'
aberration.cpp:326: warning: converting to `int' from `float'
aberration.cpp:326: warning: converting to `int' from `float'
aberration.cpp:326: warning: converting to `int' from `float'
C:DOCUME~1COMPAQ~1LOCALS~1Temp/cczJIf1H.o:aberration.cpp:(.text+0x164b): und
efined reference to `GLUI_Master'
C:DOCUME~1COMPAQ~1LOCALS~1Temp/cczJIf1H.o:aberration.cpp:(.text+0x1650): und
efined reference to `GLUI_Master_Object::create_glui(char const*, long, int, int
)'
C:DOCUME~1COMPAQ~1LOCALS~1Temp/cczJIf1H.o:aberration.cpp:(.text+0x1663): und
efined reference to `GLUI::add_statictext(char const*)'
C:DOCUME~1COMPAQ~1LOCALS~1Temp/cczJIf1H.o:aberration.cpp:(.text+0x1674): und
efined reference to `GLUI::set_main_gfx_window(int)'
C:DOCUME~1COMPAQ~1LOCALS~1Temp/cczJIf1H.o:aberration.cpp:(.text+0x19e4): und
efined reference to `GLUI_Master'
C:DOCUME~1COMPAQ~1LOCALS~1Temp/cczJIf1H.o:aberration.cpp:(.text+0x19f2): und
efined reference to `GLUI_Master_Object::set_glutIdleFunc(void (*)())'
collect2: ld returned 1 exit status

Sign In or Register to comment.

Howdy, Stranger!

It looks like you're new here. If you want to get involved, click one of these buttons!

Categories