Re: Problem linking .a files
Posted in 1996
Topics: General Discussion
Jonathan Leffler <johnl@informix.com> wrote: : Pete, : Which file contains your main routine? Without a main() (or MAIN ... END : MAIN) somewhere, there is nothing to force any of the libraries to deliver : up any of their goodies -- there are no references to be satisfied by them. : The globals.o file is picked up because it it is forcibly listed on the : command line. : Somewhere, I think, there is a trivial main() which doesn't do anything : useful, and doesn't reference anything significant -- you need to get the : one you really want linked. There must be one, else the link would fail. : But I'd suggest that there should be something like main.o on the command : line, right at the beginning and in front of any libraries. : Also, and just an FYI, the -a option does not affect the linking; it only : affects the c-code generation phase of the compiler. It can be omitted : from the link line. : Yours, : Jonathan Leffler (johnl@informix.com) #include <disclaimer.h> Thanks, that did the job. Pete Stiglich stiglich@promarkone.com