On Wednesday 05 November 2003 06:50 am, Aaron Cordova wrote:
> I have just downloaded DJGPP from www.delorie.com and I was trying to
> compile a prog that would just print the famous "Hello World!" in the
> terminal. But it wouldn't compile!!!! this is the error I got:
>
> In file included from c:/djgpp/lang/cxx/3.32/backward/iostream.h:31,
> from hello.cpp:2:
> c:/djgpp/lang/cxx/3.32/backward/backward_warning.h:32:2: warning: #warning
> This file includes at least one deprecated or antiquated header. Please
> consider using one of the 32 headers found in section 17.4.1.2 of the C++
> standard. Examples include substituting the <X> header for the <X.h> header
> for C++ includes, or <sstream> instead of the deprecated header
> <strstream.h>. To disable this warning use -Wno-deprecated.
> c:/djgpp/tmp/ccceaCCj.o(.text+0x27):hello.cpp: undefined reference to
> `std::cout'
The warning means to use "#include <iostream>" instead of iostream.h.
The errors are because djgpp isn't linking to the standard c++ library. There
is even a FAQ about this:
http://www.delorie.com/djgpp/v2faq/faq8_8.html
Hint: use -lstdcxx