delorie.com/archives/browse.cgi   search  
Mail Archives: djgpp/1999/06/15/17:21:21

Message-ID: <001301beb773$f63ae710$0101a8c0@jupiter>
From: "=?iso-8859-1?Q?Patrizio_Collov=E0?=" <opensoft AT dial DOT eunet DOT ch>
To: <djgpp AT delorie DOT com>
Subject: GNU C/C++ Compiler
Date: Tue, 15 Jun 1999 23:13:44 +0200
MIME-Version: 1.0
X-Priority: 3
X-MSMail-Priority: Normal
X-Mailer: Microsoft Outlook Express 4.72.3110.5
X-MimeOLE: Produced By Microsoft MimeOLE V4.72.3110.3
Reply-To: djgpp AT delorie DOT com

This is a multi-part message in MIME format.

------=_NextPart_000_000F_01BEB784.B6FA0FC0
Content-Type: multipart/alternative;
	boundary="----=_NextPart_001_0010_01BEB784.B6FA0FC0"


------=_NextPart_001_0010_01BEB784.B6FA0FC0
Content-Type: text/plain;
	charset="iso-8859-1"
Content-Transfer-Encoding: quoted-printable

Hi,

I installed on a Windows NT 4.0 machine the GNU software from the CD =
distribution (booklet and CD-ROM, ISBN number 1-882114-57-4). Anything =
is fine and the software is working properly and fast.
I compiled "Hello, world" in the plain C version without any problems. I =
ran strip too, which was also fine.
When I tried the C++ version, I got several errors, although the =
variable DJGPP was set.

I enclose as attachment the compiler output. Can you please give me some =
hints for this problem?

Thank you very much.

Regards,

Patrizio Collov=E0
opensoft AT dial DOT eunet DOT ch
(Switzerland)



------=_NextPart_001_0010_01BEB784.B6FA0FC0
Content-Type: text/html;
	charset="iso-8859-1"
Content-Transfer-Encoding: quoted-printable

<!DOCTYPE HTML PUBLIC "-//W3C//DTD W3 HTML//EN">
<HTML>
<HEAD>

<META content=3Dtext/html;charset=3Diso-8859-1 =
http-equiv=3DContent-Type>
<META content=3D'"MSHTML 4.72.3110.7"' name=3DGENERATOR>
</HEAD>
<BODY bgColor=3D#ffffff>
<DIV><FONT color=3D#000000 size=3D2>Hi,</FONT></DIV>
<DIV><FONT color=3D#000000 size=3D2></FONT>&nbsp;</DIV>
<DIV><FONT color=3D#000000 size=3D2>I installed on a Windows NT 4.0 =
machine the GNU=20
software from the CD distribution (booklet and CD-ROM, ISBN number=20
1-882114-57-4). Anything is fine and the software is working properly =
and=20
fast.</FONT></DIV>
<DIV><FONT color=3D#000000 size=3D2>I compiled &quot;Hello, world&quot; =
in the plain=20
C version without any problems. I ran strip too, which was also=20
fine.</FONT></DIV>
<DIV><FONT color=3D#000000 size=3D2>When I tried the C++ version, I got =
several=20
errors, although the variable DJGPP was set.</FONT></DIV>
<DIV><FONT color=3D#000000 size=3D2></FONT>&nbsp;</DIV>
<DIV><FONT color=3D#000000 size=3D2>I enclose as attachment the compiler =
output. Can=20
you please give me some hints for this problem?</FONT></DIV>
<DIV><FONT color=3D#000000 size=3D2></FONT>&nbsp;</DIV>
<DIV><FONT color=3D#000000 size=3D2>Thank you very much.</FONT></DIV>
<DIV><FONT color=3D#000000 size=3D2></FONT>&nbsp;</DIV>
<DIV><FONT color=3D#000000 size=3D2>Regards,</FONT></DIV>
<DIV><FONT color=3D#000000 size=3D2></FONT>&nbsp;</DIV>
<DIV><FONT color=3D#000000 size=3D2>Patrizio Collov&agrave;</FONT></DIV>
<DIV><FONT color=3D#000000 size=3D2><A=20
href=3D"mailto:opensoft AT dial DOT eunet DOT ch">opensoft AT dial DOT eunet DOT ch</A></FONT><=
/DIV>
<DIV><FONT color=3D#000000 size=3D2>(Switzerland)</FONT></DIV>
<DIV><FONT color=3D#000000 size=3D2></FONT>&nbsp;</DIV>
<DIV><FONT color=3D#000000 size=3D2></FONT>&nbsp;</DIV></BODY></HTML>

------=_NextPart_001_0010_01BEB784.B6FA0FC0--

------=_NextPart_000_000F_01BEB784.B6FA0FC0
Content-Type: application/octet-stream;
	name="x.x"
Content-Transfer-Encoding: quoted-printable
Content-Disposition: attachment;
	filename="x.x"

a) GNU software installed on f:\fsf
b) variable DJGPP=3Df:\fsf\djgpp.env defined
c) source hello.cpp in f:\fsf

SOURCE:

#include <iostream.h>

int main( void )
{
	cout << "Hello world, how is going?" << endl;
	return 0;
}

COMPILER OUTPUT:

F:\fsf>gcc -o hello hello.cpp
c:/ccdaaaaa(.text+0x26):hello.cc: undefined reference to `endl(ostream =
&)'
c:/ccdaaaaa(.text+0x30):hello.cc: undefined reference to `cout'
c:/ccdaaaaa(.text+0x35):hello.cc: undefined reference to =
`ostream::operator<<(c
ar const *)'
c:/ccdaaaaa(.text+0x40):hello.cc: undefined reference to =
`ostream::operator<<(o
tream &(*)(ostream &))'

NOTICE: the corresponding C programm compiles and runs without problems

SOURCE:


#include <stdio.h>
#include <stdlib.h>

int main( void )
{
	printf( "Hello world\n" );
	exit( EXIT_SUCCESS );
}



------=_NextPart_000_000F_01BEB784.B6FA0FC0--

- Raw text -


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