Mail Archives: djgpp/1997/10/27/03:47:15
quintero AT swbell DOT net wrote in article <34410249 DOT 2D03 AT swbell DOT net>...
>Hello DJGPP users,
>I have a serious problem. I downloaded all the necessary files for
>DJGPP and downloaded RHIDE 1.3c as well. Everytime I use DJGPP under
>DOS, it won't compile my programs (not even the simple hello.cc). It
>always gives me errors about the <iostream.h> and a couple others like
>e:/dj/bin/ld.exe can't find crt0.o. I don't understand it! I have
>everything in my paths
>(path=c:\dos;c:\pcci5(antivirus);d:\;e:\dj\bin;e:\)
>and the autoexec.bat and config.sys is configured to the way the FAQ
>told me. Here's a sample problem program that I have tried in vain to
>compile:
>/* Cheap program... */
>
>#include<iostream.h>
>int main()
>{
>clrscr(); // it also gives me : Warning: Implicit use of clrscr(..)
>cout<<"If this does not work, I am throwing my computer";
>cout<<" Out the window!!"<<'\n'; // I am but a novice C++ programmer. :(
>return 0;
>}
>
>also, I can't compile Allegro 2.2 using the makefile. It gives me an
>error about "can't make use (something like that) of 'Badtarget'"
>I really need help on this! Many thanks to all who help me!
>
>Sergio Peña
>
>P.S. attached is a 3d line program that one of my freinds gave me to
>test out my paths:k2.cpp.
>
Sounds to me like your forgot to set DJGPP=E:\DJ\DJGPP.ENV. If you compile a
C++ program from DOS, i recommend using GXX not GCC. GCC forgets to link in
COUT, CIN, etc. Either that or compile GCC CHEAP.CC -o CHEAP.EXE -lgpp
P.S. you can chage the 2nd cout line to cout << " Out the Window!!\n";
or cout <<" Out the window!!" << endl;
and both cout commands will be on the same line.
- Raw text -