Mail Archives: djgpp/1999/06/18/07:50:46
>bash$ gccw32 t.cc
>t.cc:1: windows.h: No such file or directory (ENOENT)
>
>Why is this not working? Also some of the sample programs don't build
>when I type make. They are complaining about missing .res files. If I
>try to build the .res file manually from the .rc file using grc, it
>again complains about a missing windows.h (even though windows.h is in
>the rsxntdj/include/Win32 directory).
This happened to me as well. I fixed it by changing the main() function of gccw32.
It's in RSXNTDJ/source/gccw32/gccw32.c. Change it to this:
int main (int argc, char ** argv)
{
char * rsxntdj = getenv ("RSXNTDJ");
if (rsxntdj)
{
char lib[1024], c[1024], cpp[1024];
add_environment(lib, "LIBRARY_PATH", rsxntdj, "\\lib");
add_environment(c, "C_INCLUDE_PATH", rsxntdj, "\\include\\win32");
add_environment(c, "C_INCLUDE_PATH", rsxntdj, "\\include");
add_environment(cpp, "CPLUS_INCLUDE_PATH", rsxntdj, "\\include\\win32");
add_environment(cpp, "CPLUS_INCLUDE_PATH", rsxntdj, "\\include");
argv[0] = "gcc";
return spawnvp (P_WAIT, "gcc.exe", argv);
}
else
{
char error[] = "set rsxntdj environment\r\n";
write (1, error, sizeof(error)-1);
return 1;
}
}
That way the C++ paths will be added to the environment as well.
--
Johan Venter
ICQ 3643877
Visit The TPU DJGPP Interest Group:
http://surf.to/djgppig
- Raw text -