delorie.com/archives/browse.cgi   search  
Mail Archives: djgpp/1998/07/20/01:45:30

Reply-To: "Jorge Ivan Meza Martinez" <jimeza AT usa DOT net>
From: "Jorge Ivan Meza Martinez" <jimeza AT usa DOT net>
To: <djgpp AT delorie DOT com>, "DreamerZ" <dreamerz AT jps DOT net>
Subject: RE: Help
Date: Mon, 20 Jul 1998 00:20:38 -0500
Message-ID: <01bdb39e$256f55a0$LocalHost@default>
MIME-Version: 1.0

>#include<iostream.h>
>int main()
>{
>cout << "hello world";
>return 0;
>}

use "gcc file.cc -o file.exe -lstdcxx".

jorge ivan meza martinez
http://members.xoom.com/THP
jimeza AT usa DOT net


-----Original Message-----
De: DreamerZ <dreamerz AT jps DOT net>
Para: djgpp AT delorie DOT com <djgpp AT delorie DOT com>
Fecha: Domingo 19 de Julio de 1998 02:09 AM
Asunto: Help


>Okay, I've got DJGPP setup ok, I think.  The environment variables are all
>set and stuff.  I'm just now trying to get everything to work correctly.
>Here's what I'm trying to do:
>
>The quick and easy hello.cpp:
>
>
>When I compile the program like that, I get:
>
> e:/djgpp/tmp\cccay4ve(.text+0x15):hello.cpp: undefined reference to `cout'
> e:/djgpp/tmp\cccay4ve(.text+0x1a):hello.cpp: undefined reference to
>`ostream::op
> erator<<(char const *)'
>
>The only iostream.h file I have is in e:\djgpp\lang\cxx\  (I've included
>it). That Iostream.h includes another file (streambuf.h) which I did not
>include.
>
>The cout command was the one I was taught for output.
>
>If I write the program like:
>
>#include<stdio.h>
>int main()
>{
>printf("Hello World");
>exit(0);
>}
>
> it works fine.
>
>That, I'm assuming is C (I haven't learned that).
>
>HELP!  What am I doing wrong?  Is it in the program or what?
>
>Thx,
>
>Chad
>

- Raw text -


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