www.delorie.com/archives/browse.cgi   search  
Mail Archives: djgpp/1998/09/04/00:46:45

Date: Thu, 3 Sep 1998 23:38:37 -0500 (CDT)
From: JAU-BING LIN <jl1013 AT broncho DOT ucok DOT edu>
To: djgpp AT delorie DOT com
Subject: Re: Why doesn't C++ work!?!?!
In-Reply-To: <35EF0D07.DC9983E1@sandia.gov>
Message-ID: <Pine.A32.3.91.980903232641.51446A-100000@broncho.ucok.edu>
MIME-Version: 1.0


On Thu, 3 Sep 1998, Jason wrote:

> Hey guys:
> 
> I have not been able to get any C++ programs compiled - and on the DJGPP
> website, it says that gcc should know what to to with the file according
> to the file's extenstion.  I tried to compile a simple C++ program that
> couts one line (it looks like this):
> 
> #include <iostream.h>
> 
> main(void)
> {
> cout << "This is a test.";
> }
> 
> (Simple enough?!?) it seemed to treat it like a C source.  Here is some
> sample output:
> 
> d:/dgjpp/tmp\ccca2vyh(.text+0x21):cpptest.cpp: undefined reference to
> 'cout'
> d:/dgjpp/tmp\ccca2vyh(.text+0x26):cpptest.cpp: undefined reference to
> 'ostream::operator<<(char const *)'

#  Your code looks find.
#  You may check the AUTOEXEC.BAT file first. Refer the README file, and
#  make sure you had setup the PATH and Evironment.

> What I get from this is it's not even recognizing the 'cout' command! 
> gcc works perfectly fine with C sources (*.c), but it has this same
> problem with *.cpp and *.C .  Anyone else had this problem?  Help me! 

#   Both  *.cpp  and  *.cc can be reconized as c++ source code by DJGPP.
#   Therefore, you do not need to worry about the extention filename.

- Raw text -


  webmaster     delorie software   privacy  
  Copyright © 2019   by DJ Delorie     Updated Jul 2019