Mail Archives: djgpp/2002/02/22/15:03:45
"Stratis Aftousmis" <lsdguru78 AT hotmail DOT com> wrote in news:%Qvd8.5806
$0y2 DOT 288632 AT typhoon DOT austin DOT rr DOT com:
> Greeting's, here is the program:
> #include <iostream.h>
> int main()
> {
> cout<<"Hello, world, will i get this to work?";
> return 0;
> }
> Here is the command: c:\djgpp> gcc hello.cpp -o hello.exe
> Here is the problem:
> In file included from hello.cpp:1:
> djgpp.ver:1:25: No include path in which to find sys/version.h
> hello.cpp:1:25: No include path in which to find iostream.h
> hello.cpp: In function ' int main()":
> hello.cpp:4: 'cout' undeclared (first use this function)
> hello.cpp:4: (Each undeclared identifier is reported only once for each
> function it appears in.)
>
> Iv'e tryed even including the header in my autoexec.bat, but now i just
> have: SET C_INCLUDE_PATH=C:\djgpp and all my header's are there.
which means you did not read the instructions (the readme.1st file has
that name for a reason). your header files have no business inc:\djgpp
... they should be in the appropriate subdirectories, and you should
never have to set C_INCLUDE_PATH unless you are adding extra stuff.
delete your c:\djgpp directory, and re-unzip the distribution preserving
the directory structure. for this either use the unzip program available
from the ftp site, or make sure the appropriate option is set in whatever
program you are using.
sinan.
- Raw text -