Newsgroups: comp.unix.sysv386 Path: utzoo!utgpu!news-server.csri.toronto.edu!rpi!zaphod.mps.ohio-state.edu!wuarchive!uunet!virtech!cpcahil From: cpcahil@virtech.uucp (Conor P. Cahill) Subject: Re: 'ld' problem in Interactive UNIX 2.2 Message-ID: <1991May15.112923.5867@virtech.uucp> Keywords: interactive unix ld Organization: Virtual Technologies Inc. References: <8625@sunbow.cam.nist.gov> Distribution: usa Date: Wed, 15 May 91 11:29:23 GMT crosson@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