'ld' problem in Interactive UNIX 2.2

Conor P. Cahill cpcahil at virtech.uucp
Wed May 15 21:29:23 AEST 1991


crosson at cam.nist.gov (Bob_Crosson_x3832) writes:


>I am running Interactive's UNIX 2.2.  I am trying to compile a
>C program using make and keep getting an error from 'ld'.
>Below are a file called 'hello.c', a make file for hello.c, and
>the results when make processes the make file.  Can anyone tell
>me why ld cannot find 'environ'?  I have used 'ar' to dump all
>of the library element names from the files /lib/lib*.a and
>/usr/lib/lib*.a and cannot find environ.  I am running the

Because environ is defined in /lib/crt0.o which is automatically
included by CC when it runs LD.  That is why it is not recommended
that you run LD yourself.  Most of the time (like 99.99999% of the time)
using CC will do everything you need.

Even if you had gotten beyond the environ stuff you probably wouldn't 
of had a working executable because of no program startup code (which is 
also in crt0.o.

Note that the name of the startup file (crt0.o) changes depending upon 
your compilation environment (For ex: a posix load will use crtp0.o)
-- 
Conor P. Cahill            (703)430-9247        Virtual Technologies, Inc.
uunet!virtech!cpcahil                           46030 Manekin Plaza, Suite 160
                                                Sterling, VA 22170 



More information about the Comp.unix.sysv386 mailing list