View Full Version : Emergency! Need help

09-04-2000, 04:00 PM
I use:
cc -o jojozhong jojozhong.c -lglut -lGL -lGLU -lXmu -lXi -lXext -lX11 -lm

to compile the file jojozhong.c, but it said:

Undefined first referenced symbol in file
sunOglCurrentContext jojozhong.o
sunOglCurPrimTablePtr jojozhong.o
ld: fatal: Symbol referencing errors. No output written to jojozhong

I dont know whether there are some more lib path I should include in the command?I am using a SUN,

I think there must be another lib that can be used as the GL, GLU X11 I used in the command.

Please help! Very emergency.!!!

Thanks a lot

09-05-2000, 12:14 AM
Well here is an old makefile I used to use...


NR = /home/scmgrp1/NR
LIBRARY = /home/scmgrp1/OpenGL
GLINC = /opt/MESA/include
GLUTINC = /home/scmgrp1/glut-3.6/include
GLLIB = /opt/MESA/lib
GLUTLIB = /home/scmgrp1/glut-3.6/lib/glut
MUILIB = /home/scmgrp1/glut-3.6/lib/mui

LDFLAGS += $(MUILIB)/browser.o $(GLLIB)/libMesaGL.so $(GLLIB)/libMesaGLU.so $(GLUTLIB)/libglut.a -R$(WIN_HOME)/lib -L$(WIN_HOME)/lib -L/
usr/dt/lib -L. -R/usr/dt/lib -L$(MUILIB)
LDLIBS += -lXm -lXt -lX11 -lXmu -lm

OBJS = bounce2.o
all: $(PROGRAM)

bounce2.o: bounce2.c
$(CC) $(CPPFLAGS) $(CFLAGS) -c bounce2.c

all debug optimise : $(PROGRAM)


dbxtool: debug
$(OPENWINHOME)/bin/xview/dbxtool $(PROGRAM)

db: debug
debugger ./$(PROGRAM)

dbx: debug
dbx $(PROGRAM)

rm -f $(OBJS) $(PROGRAM)