delorie.com/archives/browse.cgi   search  
Mail Archives: djgpp/1997/08/07/21:38:59

From: Markralph AT btinternet DOT com (Mark Ralph)
Newsgroups: comp.os.msdos.djgpp
Subject: Help for newbie.
Date: 4 Aug 1997 15:19:37 GMT
Organization: none
Lines: 75
Message-ID: <5s4ru9$bge@neon.btinternet.com>
Reply-To: Markralph AT btinternet DOT com
NNTP-Posting-Host: host5-99-54-120.btinternet.com
Mime-Version: 1.0
To: djgpp AT delorie DOT com
DJ-Gateway: from newsgroup comp.os.msdos.djgpp

HI,

I just downloaded djgpp to practise some c++ but I can't
get the simplest program to work.

I must be doing some thing very stupid so please help me s hese are the 
hardesr things to see

the program is:


/*---- File test.cpp ---*/
#include <iostream.h>

int main( void )
{
cout << "HELLO WORLD" ;
cout << endl;

return 0;
}
/*---- EOF - test.cpp ---*/

When I complile it as gcc -o test test.cpp
I get:
===================================
each line starts with ( with a different address )

c:/djgpp/tmp\ccdaaaaa(.text+0x1a):test.cc

And the colons are followed by:
...test.cc: undefined refererce to `cout'
...test.cc: undefined reference to `ostream::operator<<(char const *)'
...test.cc: undefined refererce `endl(ostream &)'
...test.cc: undefined refererce to `cout'
...test.cc: undefined reference to `ostream::operator<<(ostream &(*)(ostream 
&))'
==================================

When I redir th output from gcc I get

======================
Reading specs from c:/djgpp/lib\specs
gcc version 2.7.2.1
 c:/djgpp/bin\cpp.exe -lang-c++ -v -undef -D__GNUC__=2 -D__GNUG__=2 
-D__cplusplus -D__GNUC_MINOR__=7 -Dunix -Di386 -DGO32 -DMSDOS -DDJGPP=2 
-DDJGPP_MINOR=1 -D__unix__ -D__i386__ -D__GO32__ -D__MSDOS__ -D__DJGPP__=2 
-D__DJGPP_MINOR__=1 -D__unix -D__i386 -D__GO32 -D__MSDOS -D__DJGPP=2 
-D__DJGPP_MINOR=1 test.cpp c:/djgpp/tmp\ccbaaaaa
GNU CPP version 2.7.2.1 (80386, BSD syntax)
#include "..." search starts here:
#include <...> search starts here:
 c:/djgpp/lang/cxx
 c:/djgpp/include
 c:/djgpp/contrib/grx20/include
 /usr/local/lib/g++-include
 /usr/local/include
 /usr/local/go32/include
 /usr/local/lib/gcc-lib/go32/2.7.2.1/include
 /usr/include
End of search list.
 c:/djgpp/bin\cc1plus.exe c:/djgpp/tmp\ccbaaaaa -quiet -dumpbase test.cc 
-version -o c:/djgpp/tmp\cccaaaaa
GNU C++ version 2.7.2.1 (80386, BSD syntax) compiled by GNU C version 
2.7.2.1.
<internal>:0: Internal compiler error.
<internal>:0: Please submit a full bug report to `bug-g++@prep.ai.mit.edu'.
=========================

Can someone please help.

Thanks in advance
Mark Ralph
markralph AT earthling DOT net

- Raw text -


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