🚀 go-pugleaf

RetroBBS NetNews Server

Inspired by RockSolid Light RIP Retro Guy

Article View: gnu.gcc.help
Article #50919

help compiling c++ progs

#50919
From: Tim Wake
Date: Tue, 27 Jul 1993 03:26
35 lines
1366 bytes
Help!

I compiled gcc-2.2.2 and I am able to compile C programs but when I try 
to compile a C++ program a get the following error.  Is there some special 
env var that I need to set.

>ztlw18$ cat test.C
>
>#include <stdio.h>
>
>main()
>{
>
>        int     i;
>
>        for( i=0; i < 100; i++)
>                printf("%d", i);
>
>        printf("\n");
>
>        exit(0);
>}
>ztlw18$ gcc test.C
>test.C: In function `int  main ()':
>test.C:14: warning: implicit declaration of function `exit'
>Undefined                       first referenced
> symbol                             in file
>printf__FPCce                       test.o
>ld: a.out: fatal error: Symbol referencing errors. No output written to >a.out

Thanks,
Tim Wake

tlwake@amoco.com
Technical Details
Message-ID: <ztlw18.743743605@hgo7>
Path: arc1-ca.pugleaf.net!gmd.de!newsserver.jvnc.net!darwin.sura.net!spool.mu.edu!umn.edu!msc.edu!apctrc!hawkings!hgo7!ztlw18

Show Full Headers
Complete Article Headers
X-Google-Language: ENGLISH,ASCII-7-bit
X-Google-Thread: 11318c,758a86a4a8ca7675,start
X-Google-Attributes: gid11318c,public
X-Google-ArrivalTime: 1993-07-27 11:59:07 PST
Newsgroups: gnu.gcc.help
Path: arc1-ca.pugleaf.net!gmd.de!newsserver.jvnc.net!darwin.sura.net!spool.mu.edu!umn.edu!msc.edu!apctrc!hawkings!hgo7!ztlw18
From: ztlw18@hgo7.hou.amoco.com (Tim Wake)
Subject: help compiling c++ progs
Message-ID: <ztlw18.743743605@hgo7>
Summary: help compiling c++ progs
Keywords: gcc,c++
Sender: news@amoco.com
Organization: Amoco Corp.
Date: Tue, 27 Jul 1993 03:26:45 GMT
Lines: 36