LinuxQuestions.org
Download your favorite Linux distribution at LQ ISO.
Home Forums Tutorials Articles Register
Go Back   LinuxQuestions.org > Forums > Non-*NIX Forums > Programming
User Name
Password
Programming This forum is for all programming questions.
The question does not have to be directly related to Linux and any language is fair game.

Notices


Reply
  Search this Thread
Old 09-28-2004, 05:20 PM   #1
lordg
LQ Newbie
 
Registered: Sep 2004
Posts: 2

Rep: Reputation: 0
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?
 
Old 09-29-2004, 03:22 AM   #2
corbis_demon
Member
 
Registered: Jun 2004
Distribution: CLFS
Posts: 523

Rep: Reputation: 38
What version of GCC are you using on your system?if 3.3,then you might have a problem,coz i had the same problem with it.Better get a patch or update gcc to 3.4.2.
 
  


Reply



Posting Rules
You may not post new threads
You may not post replies
You may not post attachments
You may not edit your posts

BB code is On
Smilies are On
[IMG] code is Off
HTML code is Off



Similar Threads
Thread Thread Starter Forum Replies Last Post
newbie in linux-mandrake; installing .rpm vmware for linux jet_espinal Mandriva 2 11-02-2006 06:06 AM
installing redhat linux 9.1 in dual boot mode(actually 98,xp,linux together) linuxchub Linux - Newbie 1 09-16-2004 10:21 AM
GLUI - cannot create libglui.a adhara Programming 2 08-08-2004 09:13 PM
Installing programs in linux? which progs? can linux do the things windows can? James-jmpm Linux - Newbie 6 07-02-2004 07:01 PM
Installing windows over linux on a fully partitioned drive for linux reddon84 Linux - Software 2 01-26-2004 06:17 PM

LinuxQuestions.org > Forums > Non-*NIX Forums > Programming

All times are GMT -5. The time now is 04:39 PM.

Main Menu
Advertisement
My LQ
Write for LQ
LinuxQuestions.org is looking for people interested in writing Editorials, Articles, Reviews, and more. If you'd like to contribute content, let us know.
Main Menu
Syndicate
RSS1  Latest Threads
RSS1  LQ News
Twitter: @linuxquestions
Open Source Consulting | Domain Registration