Help installing Glui on Linux
I downloaded Glui and I tried installing it and this is the error message I got when trying to compile.
g++ -c -I/usr/include/GL glui_add_controls.cpp
In file included from glui_add_controls.cpp:19:
glui.h:298: error: friend declaration requires class-key, i.e. `friend struct
GLUI_Rollout'
glui.h:299: error: friend declaration requires class-key, i.e. `friend struct
GLUI_Main'
glui.h:562: error: friend declaration requires class-key, i.e. `friend struct
GLUI_Control'
glui.h:563: error: friend declaration requires class-key, i.e. `friend struct
GLUI_Rotation'
glui.h:564: error: friend declaration requires class-key, i.e. `friend struct
GLUI_Translation'
glui.h:565: error: friend declaration requires class-key, i.e. `friend struct
GLUI'
glui.h:566: error: friend declaration requires class-key, i.e. `friend class
GLUI_Master_Object'
make: *** [glui_add_controls.o] Error 1
Below is my make file:
-------------------------------------------------------------------------------------------------------------------
.SUFFIXES: .cpp
#Change the following two lines to reflect the locations
# of the GLUT library (.a) and includes on your system
GLUT_LIB_LOCATION=/usr/lib
GLUT_INC_LOCATION=/usr/include/GL
CFLAGS =
#for sgi -- comment out the lines below to use on HP
#CC=g++ -g0 -o32
#CC=gcc
CC=g++
CPPFLAGS=-I${GLUT_INC_LOCATION} #-w
GLLIBS=-L${GLUT_LIB_LOCATION} -lglut -lGL -lGLU
LPATH=${GLUTPATH}
INCS=
libs = ${GLLIBS} -lXmu -lXext -lX11 -lXi -lm #-lmalloc
LIBGLUI= -Llib -lglui
All: lib/libglui.a bin/example1 bin/example2 bin/example3 bin/example4 bin/example5
GLUI_OBJS = glui_add_controls.o glui.o glui_bitmap_img_data.o glui_bitmaps.o glui_button.o glui_edittext.o glui_checkbox.o glui_node.o glui_radio.o glui_statictext.o glui_panel.o glui_separator.o glui_spinner.o glui_control.o glui_column.o glui_translation.o glui_rotation.o glui_mouse_iaction.o glui_listbox.o glui_rollout.o arcball.o algebra3.o quaternion.o
bin/example1: $(GLUI_OBJS) example1.o lib/libglui.a
@echo "Linking example1"
$(CC) $(CFLAG) $(CPPFLAGS) $(LPATH) example1.o $(LIBGLUI) $(libs) -o bin/example1
bin/example2: $(GLUI_OBJS) example2.o lib/libglui.a
@echo "Linking example2"
$(CC) $(CFLAG) $(CPPFLAGS) $(LPATH) example2.o $(LIBGLUI) $(libs) -o bin/example2
bin/example3: $(GLUI_OBJS) example3.o lib/libglui.a
@echo "Linking example3"
$(CC) $(CFLAG) $(CPPFLAGS) $(LPATH) example3.o $(LIBGLUI) $(libs) -o bin/example3
bin/example4: $(GLUI_OBJS) example4.o lib/libglui.a
@echo "Linking example4"
$(CC) $(CFLAG) $(CPPFLAGS) $(LPATH) example4.o $(LIBGLUI) $(libs) -o bin/example4
bin/example5: $(GLUI_OBJS) example5.o lib/libglui.a
@echo "Linking example5"
$(CC) $(CFLAG) $(CPPFLAGS) $(LPATH) example5.o $(LIBGLUI) $(libs) -o bin/example5
lib/libglui.a: $(GLUI_OBJS)
@echo "Creating library"
ar -r lib/libglui.a $(GLUI_OBJS)
.cpp.o:
$(CC) -c $(CFLAGS) $(CPPFLAGS) $(INCS) $*.cpp
.c.o:
$(CC) -c $(CFLAGS) $(CPPFLAGS) $(INCS) $*.c
clean:
/bin/rm *.o
------------------------------------------------------------------------------------------------------------------------
Does anyone know what I'm doing wrong?
|