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$>
Reply-To: Markralph AT btinternet DOT com
Mime-Version: 1.0
To: djgpp AT delorie DOT com
DJ-Gateway: from newsgroup comp.os.msdos.djgpp


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 )


And the colons are followed by: undefined refererce to `cout' undefined reference to `ostream::operator<<(char const *)' undefined refererce `endl(ostream &)' undefined refererce to `cout' 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
 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 (80386, BSD syntax)
#include "..." search starts here:
#include <...> search starts here:
End of search list.
 c:/djgpp/bin\cc1plus.exe c:/djgpp/tmp\ccbaaaaa -quiet -dumpbase 
-version -o c:/djgpp/tmp\cccaaaaa
GNU C++ version (80386, BSD syntax) compiled by GNU C version
<internal>:0: Internal compiler error.
<internal>:0: Please submit a full bug report to `'.

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