Mail Archives: djgpp/2000/05/26/10:17:14.1
Hi, all! My name is Kurt, and this question is similar to the one
posted by Bryan Phillips: I recently purchased Sam's Teach-Yourself
C++ in 24 Hours. It included DJGPP v2(.02, I think) and RHIDE v1.4. I
installed them, and ran the following Hello World program in Chptr 1:
=========================================================
#include <iostream.h>
int main();
int main()
{
cout << "Hello World!\n";
return 0;
}
=========================================================
DJGPP is in C:\djgpp, I've got the following lines in autoexec.bat:
set djgpp=c:\djgpp\djgpp.env
and the path add-on:
set path=c:\djgpp;%path%
(or something like that). If I run GCC exactly like this:
c:\freesoft\programs\c>gcc hello.cpp -o hello.exe
it produces the following errors:
c:/djgpp/tmp\ccciaioh(.text+0x19):hello.cpp:_undefined_reference_to_`cout'
c:/djgpp/tmp\ccciaioh(.text+0x1e):hello.cpp:_undefined_reference_to_`ostream::operator<<(char_const_*)'
(note, underscores have replaced spaces
to put everything on the same line)
The weird thing is, RHIDE can produce a working executable!
I'm really stuck here; if anybody can clarify, I woudl greatly
appreciate it. Thank you all in advance.
Visit me on the web at: truk (dot) wxs (dot) org
- Raw text -