*BSD News Article 50905


Return to BSD News archive

#! rnews 1337 bsd
Path: euryale.cc.adfa.oz.au!newshost.anu.edu.au!harbinger.cc.monash.edu.au!simtel!news.kei.com!news.mathworks.com!news.duke.edu!agate!uclink.berkeley.edu!cchiu
From: cchiu@uclink.berkeley.edu (Chun-Yang Chiu)
Newsgroups: comp.unix.bsd.freebsd.misc
Subject: Can not compile?
Date: 8 Sep 1995 02:26:34 GMT
Organization: University of California, Berkeley
Lines: 29
Message-ID: <42o9kq$jan@agate.berkeley.edu>
NNTP-Posting-Host: uclink.berkeley.edu

Hi:

It seems that my compiler is not configured properly, but I dont know 
where to find the documents on fixing this problem(I dont even know what 
my problem is :( ).  Use the following small program as example:

#include <stdlib.h>

main()
{
  printf("test");
}


when I try to compile, be it cc or gcc, I get the following:

/usr/lib/crt0.o: Undefined symbol `_getenv' referenced from text segment
/usr/lib/crt0.o: Undefined symbol `__startup_setlocale' referenced from 
text segment
/usr/lib/crt0.o: Undefined symbol `_exit' referenced from text segment
/var/tmp/cc0052351.o: Undefined symbol `_printf' referenced from text segment
__main.o: Undefined symbol `_atexit' referenced from text segment

I guess it could be the problem of the linker, but how can I fix this 
problem?  Thank you very much for helping me!

Chun-Yang Chiu
-------------------------
cchiu@uclink.berkeley.edu