30000+ Undefined References

30000+ Undefined References

Post by David Ventur » Thu, 10 Jun 1999 04:00:00



I am building a X-Windows application that is dependent on several
objects, half a dozen user libraries, and half a dozen X system
libraries.  I've hacked through all the compiler errors, and now am in
the process of linking, but I'm issued literally over 30K "undefined
references" to functions in the libraries.  Obviously I'm missing
something simple and the linker cannot find the libraries, right?  I
have flags in my makefile for user and system libraries, each of the
form:

usr_lib = -lmylib1 -lmylib2
sys_lib = -lsyslib1 -syslib2 ... (you get the idea)

and macros for the paths to the libraries :
lib_path = -L${PATH_TO_USER} \
            -L${PATH_TO_XLIBS}

The user library path leads to a directory of soft links (I'm using
Linux Kernel 2.2) that each point to the actual library, whereas the X
libraries are physicall in the ${PATH_TO_XLIBS}.  My flags for make are:

defines = -DSPARC_SUNOS53 -DLINUX -D_XOPEN_SOURCE

flags = -MD -ansi -pedantic -Wall -Wno-unused

debug = -g

Most of which I don't fully understand (I'm working on someone else's
project).  In any case, is there possibly a flag I'm missing?  Or is it
a shell thing? (I use tcsh)  Please just give me an idea what could be
wrong.  Thanks.

davyjaye