Path: utzoo!utgpu!news-server.csri.toronto.edu!cs.utexas.edu!sun-barr!olivea!uunet!mcsun!unido!unidui!veit From: veit@du9ds3.uni-duisburg.de (Holger Veit) Newsgroups: comp.binaries.ibm.pc.d Subject: Re: Problems using gcc ( dj1bin ) to compile c++ Keywords: gcc g++ C c++ dj1bin Message-ID: Date: 1 Mar 91 15:07:25 GMT References: <1991Feb27.145341.18701@newcastle.ac.uk> Sender: @unidui.uni-duisburg.de Organization: Rechenzentrum Uni-Duisburg Lines: 42 In <1991Feb27.145341.18701@newcastle.ac.uk> J.D.Coleman@newcastle.ac.uk (Julian Coleman) writes: >We are having problems getting gcc to compile a simple c++ program. >This is the program : >----------------------------------------------------------------------- >// File hello.c [...the well known C++ hello world follows, everybody knows...] >This is the compile sequence for this program : >C:\C\SOURCE\GCC\TEST>gcc -v -o hello hello.c >gcc version 1.37.1 > cpp -v -undef -D__GNUC__ -Dunix -Di386 -D__unix__ -D__i386__ hello.c c:/pdsoft/ >gcpp/tmp/ccAA_AAA.cpp >GNU CPP version 1.37.1 >c:/pdsoft/gcpp/inc/_File.h:50: unterminated string or character constant >c:/pdsoft/gcpp/inc/_File.h:51: unterminated string or character constant >c:/pdsoft/gcpp/inc/_File.h:52: unterminated string or character constant >c:/pdsoft/gcpp/inc/streambuf.h:97: unterminated string or character constant >----------------------------------------------------------------------- >What is wrong ? > | Julian Coleman | J.D.Coleman@newcastle.ac.uk | Same problem as already replied before. The compiler driver GCC.EXE requires the extensions .c for C-Sources .cc for C++ - Sources .s for AS - Sources .i preprocessor output other extensions are passed to the linker, e.g. .o, .a, .cpp (!), .c++ (!) To your problem: rename hello.c to hello.cc and try again. Holger Veit -- | | / Holger Veit | INTERNET: veit@du9ds3.uni-duisburg.de |__| / University of Duisburg | BITNET: veit%du9ds3.uni-duisburg.de@UNIDO | | / Fac. of Electr. Eng. | UUCP: ...!uunet!unido!unidui!hl351ge | |/ Dept. f. Dataprocessing |