delorie.com/archives/browse.cgi   search  
Mail Archives: djgpp/1998/09/07/21:00:24

From: Endlisnis <s257m AT unb DOT ca>
Newsgroups: comp.lang.c++,comp.os.msdos.djgpp
Subject: Re: Newbie Question regarding include
Date: Mon, 07 Sep 1998 21:43:24 -0300
Organization: NBTel Internet
Lines: 18
Message-ID: <35F47DAC.E8A1878B@unb.ca>
References: <01bddab6$7b68a300$LocalHost AT jonadab>
NNTP-Posting-Host: fctnts08c08.nbnet.nb.ca
Mime-Version: 1.0
To: djgpp AT delorie DOT com
DJ-Gateway: from newsgroup comp.os.msdos.djgpp

Jonadab the Unsightly One wrote:
> First of all, I have programmed in a number of languages and am only
> new to C++.  Unfortunately my only reference is the Dummies book on
> Borland 4.0, so if anybody could direct me to a better online reference
> that might help even more than an answer to my question.
> The question is, how do I get include to work?
> Anyway, here's my command line:
> E:\A\DJGPP\BIN\Gcc.exe -v -x c++ D:\C\HELLOW.C -o D:\C\HELLOW.exe -lstdc
	The problem is not with any of your syntax, it is that you are using
"Hellow.c" as a filename and not "Hellow.cc" or "Hellow.cpp".  GCC thinks that
your file is strickly a "C" source file and therefore would not be able to use
"iostream.h".  Also, you should change "-lstdc" to "-lstdcxx" since you are
using C++ and not C.
-- 
     (\/) Endlisnis (\/)
          s257m AT unb DOT ca
          Endlisnis AT GeoCities DOT com
          Endlis AT nbnet DOT nb DOT ca

- Raw text -


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