[Date Prev][Date Next] [Thread Prev][Thread Next] [Date Index] [Thread Index]

Re: gcc can't compile, egcc can!??



On  9 Jun, Liran Zvibel wrote:
> Hi,
> 
> What does g++ say about the file?
> 
> I don't use gcc (only g++). I know that at my Uni. some programs don't
> compile on gcc because it doesn't support some features. I think that the
> problem with the _environ is that it doesn't know that there is a global
> variable called environ that passes the environment list to the program,
> and still waiting to the int main(int argc, char * argv[], char * envp)
> style. I'm not sure about it thought. You should try g++.


No complaints from g++(v. 2.90.28-0.1).  You see the problem is that I
am not a C programmer(yet) and this all started after I upgraded to
hamm and wanted to build a new kernel and it failed.  So where does this
leave me and why am I having these problems, and apparently nobody else
is?

Thanks,

Brian

> 
> Liran. 
> 
> ---
> http://www.math.tau.ac.il/~liranz/
> 
> On Tue, 9 Jun 1998 servis@purdue.edu wrote:
> 
>> > Hi all,
>> > 
>> > I can't get gcc to compile anything but egcc can.  Example:
>> > 
>> > /* hello world */
>> > #include <stdio.h>
>> > int main(void)
>> > {
>> >   printf("Hello world!\n");
>> >   return 0;
>> > }
>> > /* end hello world */
>> >
>> > tcsh% gcc -o hello hello.c
>> > /usr/lib/crt1.o(.text+0xe): undefined reference to `__libc_init_first'
>> > /usr/lib/crt1.o(.text+0x18): undefined reference to `_environ'
>> > 
>> > tcsh% egcc -o hello hello.c
>> > tcsh% hello
>> > Hello world!
>> > 
>> Ack...hit the wrong key before I was done....sorry.
>> 
>> I should mention I have the following installed(from dpkg -l):
>> 
>> ii  gcc             2.7.2.3-4.5    The GNU C compiler.
>> ii  cpp             2.7.2.3-4.5    The GNU C preprocessor.
>> ii  egcc            2.90.28-0.1    The GNU (egcs) C compiler.
>> ii  libc6           2.0.7pre3-1    The GNU C library version 2 (run-time files)
>> ii  libc6-dev       2.0.7pre3-1    The GNU C library version 2 (development fil
>> 
>> Thanks for any pointers,
>>  
>> Brian 
>> -- 
>> Mechanical Engineering                              servis@purdue.edu
>> Purdue University                   http://www.ecn.purdue.edu/~servis
>> 


--
To UNSUBSCRIBE, email to debian-user-request@lists.debian.org
with a subject of "unsubscribe". Trouble? Contact listmaster@lists.debian.org


Reply to: