Article View: gnu.gcc.help
Article #42607Compiling gcc for sunos 4.1.4
From: Christine Lovejoy
Date: Wed, 15 Nov 1995 00:00
Date: Wed, 15 Nov 1995 00:00
32 lines
1223 bytes
1223 bytes
Hi
I have compiled gcc 2.7.0 on a sparc 20
running sunos 4.1.4.
When I try to compile the following program
I get errors.
#include <stdlib.h>
#include <stdio.h>
main(void){
printf("Hello world\n");
return EXIT_SUCCESS;
}
I try to compile like this:
gcc -Wall -ansi -pendantic -o foo foo.c
There error is:
foo.c: In function 'main':
foo.c:6: warning: implicit declaration of function 'printf'
foo.c:7: 'EXIT_SUCCESS' undeclared (first use this function)
foo.c:7: (Each undeclared identifier is reported only once
foo.c:7: for each function it appears in.)
foo.c:9: warining: control reaches end of non-void function
It looks like stdio.h and stblib.h are not right.
Can anyone help me?
Chris
Technical Details
Message-ID:
<48d9vh$cef@shell.fore.com>Path:
arc1-ca.pugleaf.net!unknown!not-for-mailShow Full Headers
Complete Article Headers
X-Google-Language: ENGLISH,ASCII-7-bit X-Google-Thread: 11318c,2fc093fc1b54c223,start X-Google-Attributes: gid11318c,public From: Christine Lovejoy <lovejoy@fore.com> Subject: Compiling gcc for sunos 4.1.4 Date: 1995/11/15 Message-ID: <48d9vh$cef@shell.fore.com> X-Deja-AN: 119446888 content-type: text/plain; charset=us-ascii organization: FORE Systems x-url: news:gnu.gcc.help mime-version: 1.0 newsgroups: gnu.gcc.help x-mailer: Mozilla 1.1N (X11; I; SunOS 4.1.4 sun4c)