Mail Archives: djgpp/1998/06/17/14:45:39
New6ie wrote:
>
> Hello,
> I've recently tried installing RSXNTDJ 1.3.1 on my windows 95 system and
> have run into some problems. I am pretty sure I followed the directions in the
> readme.exe file, but cannot compile the example program. I unpacked the
> rsxntdj file structure in my djgpp directory. The steps I took in installing
> are as follows:
>
> 1. I replaced the linker (ld.exe) with the new linker from the rsxntdj\patch
> directory.
>
> 2. I modified my path from:
> C:\DJGPP\BIN;C:\WINDOWS;C:\WINDOWS\COMMAND;C:\DOS
>
> to:
> C:\DJGPP\BIN;C:\DJGPP\RSXNTDJ\BIN;C:\WINDOWS;C:\WINDOWS\COMMAND;C:\DOS
> 3. I modified the 2 sections in the SPECS file in \RSXNTDJ\LIB from:
>
> *cpp:
> %{posix:-D_POSIX_SOURCE} %{Zmt: -D__MT__} %{Zdll: -D__DLL__}
> %{Zcrtdll*:-D__CRTRSXNT__}\
> %{Zwin32: -D__WIN32__ -D__RSXNT__ -D__EMX__ -If:/rsxntdj/include}
>
> and
>
> *link:
> %{Zwin32: -Lf:/rsxntdj/lib/all}
>
> TO:
>
> *cpp:
> %{posix:-D_POSIX_SOURCE} %{Zmt: -D__MT__} %{Zdll: -D__DLL__}
> %{Zcrtdll*:-D__CRTRSXNT__}\
> %{Zwin32: -D__WIN32__ -D__RSXNT__ -D__EMX__ -IC:/djgpp/rsxntdj/include}
>
> and
>
> *link:
> %{Zwin32: -LC:/djgpp/rsxntdj/lib/all}
>
> 4. I set the RSXNTDJ environment to:
> set RSXNTDJ=C:\DJGPP\RSXNTDJ
>
> 5. I copied the new djgpp.env file from rsxntdj\lib to the djgpp dir.
>
> Now, when I run: gcc -v I get:
>
> Reading specs from c:\DJGPP\RSXNTDJ/lib\specs
> gcc version 2.7.2.1
>
> instead of the following as the instructions suggest I should get:
>
> Reading specs from c:\DJGPP\RSXNTDJ\lib\specs
> gcc version 2.7.2.1
>
> And finally, when I try to compile the test program, saved as test.c, using:
> gcc -Zwin32 test.c -o test.exe
>
> int WINAPI WinMain(HINSTANCE hInstance, HINSTANCE hPrevInstance,
> LPSTR lpCmdLine, int nCmdShow)
> {
> MessageBox (NULL, "Hello Win32", "First App", MB_OK);
> return 0;
> }
>
> I get the following errors:
>
> test.c:1: parse error before 'WinMain'
> test.c:1 parse error before 'hInstance'
> test.c: In function 'WinMain':
> test.c:6: 'NULL' undeclared (first use this function)
> test.c:6: (Each undeclared identifier is reported only once
> test.c:6: for each function it appears in.)
> test.c:6: 'MB_OK' undeclared (first use this function)
>
> Any help would be appreciated.
> -JayD.
Try adding #include <windows.h> to the top of the program.
Peter Allen
- Raw text -