delorie.com/archives/browse.cgi   search  
Mail Archives: djgpp/1999/06/18/07:50:46

From: "Johan Venter" <jventer AT writeme DOT com>
Newsgroups: comp.os.msdos.djgpp
References: <b_D83.9369$PN5 DOT 25093 AT newsfeeds DOT bigpond DOT com> <37632753 DOT E2A12766 AT montana DOT com> <hqN83.9749$PN5 DOT 25503 AT newsfeeds DOT bigpond DOT com> <3769B548 DOT F9A4F2B9 AT magma DOT ca>
Subject: Re: Request for help in telling everybody about NEW RSXNTDJ!
Lines: 47
X-Newsreader: Microsoft Outlook Express 4.72.3110.1
X-MimeOLE: Produced By Microsoft MimeOLE V4.72.3110.3
Message-ID: <LSpa3.12167$PN5.31648@newsfeeds.bigpond.com>
Date: Fri, 18 Jun 1999 15:34:51 +1000
NNTP-Posting-Host: 139.134.161.110
X-Trace: newsfeeds.bigpond.com 929704491 139.134.161.110 (Fri, 18 Jun 1999 21:14:51 EST)
NNTP-Posting-Date: Fri, 18 Jun 1999 21:14:51 EST
Organization: Telstra BigPond Internet Services (http://www.bigpond.com)
To: djgpp AT delorie DOT com
DJ-Gateway: from newsgroup comp.os.msdos.djgpp
Reply-To: djgpp AT delorie DOT com

>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 -


  webmaster     delorie software   privacy  
  Copyright © 2019   by DJ Delorie     Updated Jul 2019