delorie.com/archives/browse.cgi   search  
Mail Archives: djgpp/1994/07/29/20:18:44

Date: Fri, 29 Jul 1994 18:32:24 -0400
From: Lipchen Alex Chan <chan AT acsu DOT buffalo DOT edu>
To: djgpp AT sun DOT soe DOT clarkson DOT edu
Subject: ld problem in searching extra libraries
Cc: chan AT acsu DOT buffalo DOT edu

Hello DJ,

I tried to make an SUIT (Simple User Interface Toolkit) executable for 
Windows or DOS using DJGCC 1.11m5 with the makefile shown below but I
have never succeeded due to linker errors. The error message is listed
after the makefile. How to make ld knows where to find -lsuit -lsrgp
-lgrx etc. beside specifying the corresponding -Llibpaths in the Makefile?

Thanks for help. Have a nice weekend.

Alex


######################################################################
# Makefile for SUIT applications
######################################################################

# this denotes where the SUIT distribution lives
SUIT      =E:/SUIT
XLIBS     =D:/CONTRIB/LIBGRX/LIB
X_INC_DIR =D:/CONTRIB/LIBGRX/INCLUDE

CC      =       gcc
LDLIBS  =       -lsuit -lsrgp -lgrx -lm
LDFLAGS =       -L$(SUIT)/dos/lib -L$(XLIBS)

#DEBUG  =       -g
OPTIMIZE =      -O

########################### NOTE ####################################
#
# comment out the -static flag to 
# make dynamically linked executables.
# This will make your programs take up less room on disk.
# ... and no fatal error on compilation. (alex)
#####################################################################
#STATIC= -static

CFLAGS = -fpcc-struct-return  -Wall -I$(SUIT)/include -I$(X_INC_DIR) $(DEBUG) $(OPTIMIZE)

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

COMPILE.c=$(CC) $(CFLAGS) $(CPPFLAGS) -c

empty: empty.o
        $(CC) $(CFLAGS) $(LDFLAGS) -o empty empty.o $(LDLIBS) 
        strip empty
######################################################################

clean:
        rm -f *.o core empty 



(End of makefile, Error message is below:)


<<E:\SUIT\TEST>>make alex
gcc -fpcc-struct-return  -Wall -IE:/SUIT/include -ID:/CONTRIB/LIBGRX/INCLUDE  -O
  -LE:/SUIT/dos/lib -LD:/CONTRIB/LIBGRX/LIB  alex.c  -lsuit -lsrgp -lgrx -lm -o
alex
alex.c: In function `HitCoordTester':
alex.c:86: warning: implicit declaration of function `fabs'
d:/gcc/bin/ld.exe: Can't open suit
make.exe: *** [alex] Error 1




- Raw text -


  webmaster     delorie software   privacy  
  Copyright © 2019   by DJ Delorie     Updated Jul 2019