FROM: http://www.programmersheaven.com/mb/openGL/382451/382451/glui-windows-mingw32/ 2008dec post: 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 midname -Wall midname.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 ############################################################################# FROM: http://www.linuxquestions.org/questions/linux-software-2/help-installing-glut-157895/ 2004, on Mandrake compiling simple GLUTbased pgm: gcc -I/usr/X11R6/include -L/usr/local/lib -lglut -lGL -lGLU -o simpleGlut simpleGlut.c ... I also added /usr/local/lib (where libglut.a libglut.la libglut.so libglut.so.3 libglut.so.3.8.0 were) to the LD_LIBRARY_PATH and LD_RUN_PATH. ... His hello-world test program: #include int main( int argc, char** argv ) { glutInit( &argc, argv ); glutInitDisplayMode( GLUT_RGB ); glutInitWindowPosition( 0, 0 ); glutInitWindowSize( 300, 300 ); int myWindow = glutCreateWindow( "hello world!" ); glutMainLoop(); return 0; } ################################################################################# Also see FLTK compile and link docs.- in $HOME/apps/fltk/doc ############################################################################### FROM: http://www.sccg.sk/~durikovic/classes/CG1/CGsoft.html Typical link sequences, if you're using FLTK, are: on Linux: -lfltk -lGLU -lGL -lX11 -lXext -lm on Sun: -lfltk -lGLU -lGL -lX11 -lXext -lsocket -lm on SGI: -lfltk -lGLU -lGL -lX11 -lm If you're linking with the pic_ and tiff_ routines, then you'll need -lpicio -ltiff as well. ################################################################################# FROM: On my computer to compile a c program using said library I would need to do something like - gcc -I/usr/include/atk-1.0 -I/usr/include/gtkglext-1.0 -I/usr/lib64/gtkglext-1.0/include -I/usr/include/gtk-2.0 -I/usr/lib64/gtk-2.0/include -I/usr/include/pango-1.0 -I/usr/include/glib-2.0 -I/usr/lib64/glib-2.0/include -I/usr/include/cairo -I/usr/include/freetype2 -I/usr/include/libpng12 -I/usr/include/pixman-1 -Wl,--export-dynamic -latk-1.0 -lgdkglext-x11-1.0 -lGLU -lGL -lXmu -lXt -lSM -lICE -lgdk-x11-2.0 -lpangox-1.0 -lX11 -lgdk_pixbuf-2.0 -lpangocairo-1.0 -lcairo -lpango-1.0 -lgobject-2.0 -lgmodule-2.0 -ldl -lglib-2.0 -o hello bob.c for example, now that is a pain in the ... so you can store it in your build file or you can just use pkg-config if you have it installed. gcc `pkg-config --cflags --libs gdkglext-1.0` -I/usr/include/atk-1.0/ -latk-1.0 -o hello bob.c ------------------ ALSO: Try using pkg-config. Compiling gtk and friends usually requires a whole list of libraries too numerous to remember and too tedious to type by hand every time you compile. Something like this should work: gcc yourprogram.c -o yourprogram `pkg-config gtkglext-1.0 --cflags --libs` If you're curious as to what the output of pkg-config actually looks like, you can type pkg-config gtkglext-1.0 --libs at the command prompt to get a list of the required libraries. These just get appended as arguments to the gcc command. -------------- ALSO: I don't know if you've resolved the segfault issue with gtk_gl_init(), but you might try calling gtk_init() before calling gtk_gl_init(). My first attempt at a program that only calls gtk_gl_init() and closes gave me a segfault as well. Then I found a nice bit of sample code here: http://www.cairographics.org/OpenGL/ (The "Beef it up a little" example actually uses GtkGlExt) Here gtk_init() is called before gtk_gl_init(). Adding that to my tiny test program fixed the segfault. It may in your code too. My sample code (compile using pkg-config as mentioned before): #include #include int main(int argc, char ** argv) { gtk_init(&argc, &argv); gtk_gl_init(&argc, &argv); return 0; } ################################################################################# FROM: http://chengaiti.wordpress.com/ DO NOT INSTALL THE GLUI FROM UBUNTU REPOSITORY! THEY ARE OUT-OF-DATE! Download the newest version of GLUI from SourceForge.Net. 1. Copy the glui.h to /usr/include/GL/ 2. Copy the libglui.a to /usr/lib/ If you already installed from the ubuntu repository, remove all the files. 1. Remove the glui.h from /usr/include/ (caused by the apt-get installing glui.h outside the GL directory) 2. Remove all the glui libraries (*.so installed by apt-get) from /usr/lib/ Only keep one glui library, libglui.a, in this directory! ##############################################################################