XForms: libforms errors

Can Alkan (calkan@cs.bilkent.edu.tr)
Mon, 15 Nov 1999 13:20:59 +0200 (EET)

# To subscribers of the xforms list from Can Alkan <calkan@cs.bilkent.edu.tr> :

On Sun, 14 Nov 1999, Steve Lamont wrote:

> # To subscribers of the xforms list from spl@szechuan.ucsd.edu (Steve Lamont) :
>
> > I am trying to compile a program that runs on Solarris on my Linux
> > OS.I installed Xforms for linux, and Mesa 3.0 for Linux. When I try to
> > compile the program, Xforms returns errors like:
> >
> > /usr/local/xforms/FORMS//libforms.so: undefined reference to `XSetCommand'
> > [...]
> > and many others. How can I solve this problem?
>
> Make sure you're linking with the X libraries and that the the X
> libraries follow the xforms library. For example:
>
> gcc -o try -ggdb3 -L/usr/X11R6.3/lib try.o try_main.o \
> -lforms -lXpm -lMesaGL -lMesaGLU -lXext -lX11 -lm
>
> spl
> _________________________________________________
> To unsubscribe, send the message "unsubscribe" to

My makefile is as follows:

#
# Makefile for CS465 Computer Graphics Assignments
#
# Use this file to compile your programs.
#
# type
# make -f Makefile.sun
#
# your executable file will be "paint.sun"
#
#

# XFORMS is path to get Xforms.
XFORMS = /usr/local/xforms/FORMS
MESA = /usr/local/Mesa-2.6/include
GCC = /usr/local/lib/g++-include

########################################################################
# X11 Section
#
X11_INCDIR = /usr/openwin/include
X11_LIBS = -lX11 -lsocket -lnsl -lXext

########################################################################

# include and library paths
IPATH = -I$(XFORMS) -I$(X11_INCDIR) -I$(MESA) -I$(GCC)
# PICLIBS = -lpicio -ltiff
# If you have problems while compiling the program, uncomment the
# following line.
PICLIBS = -lpicio -ltiff
GLLIBS= -lGLU -lGL
MESALIBS = -lMesaGLU -lMesaGL -lMesaaux
COMMONLIBS = -lforms $(PICLIBS) -lm -lg++
SUNLIBS = $(X11_LIBS) $(MESALIBS) $(COMMONLIBS) $(GLLIBS) -lXpm
-lXmu -lXt -lSM -lICE

# compiler and settings to use
SGICC = cc
SUNCC = gcc
SGICFLAGS = -g2 $(IPATH) -mips2
SUNCFLAGS = -O2 $(IPATH)

# ---------- BEGIN SECTION TO CHANGE AS NEEDED ----------

# name of the program
PROGNAME = paint.sun

# compiler to use
CC = gcc

# compiler flags to use
CFLAGS = $(SUNCFLAGS)

# list of libraries to link
LIBS = $(SUNLIBS)

# list of source files to compile
SOURCE = glxf.c ui_form.c main.c

# list of object files to link
OBJECT = glxf.o ui_form.o main.o

# ---------- END SECTION TO CHANGE AS NEEDED ----------

.c.o:
$(CC) -c $(CFLAGS) $<

$(PROGNAME): $(OBJECT)
$(CC) $(CFLAGS) -o $(PROGNAME) $(OBJECT) $(LIBS)

clean:
-rm -rf core *.o *~ "#"*"#" Makefile.sun.bak

depend:
makedepend $(IPATH) $(SOURCE)

As it can be seen on the makefile, I added all the libraries I know about
Xforms.

_________________________________________________
To unsubscribe, send the message "unsubscribe" to
xforms-request@bob.usuhs.mil or see
http://bob.usuhs.mil/mailserv/xforms.html
XForms Home Page: http://bragg.phys.uwm.edu/xforms
List Archive: http://bob.usuhs.mil/mailserv/list-archives/