www.delorie.com/archives/browse.cgi   search  
Mail Archives: djgpp/1996/06/12/10:23:23

From: "A.Appleyard" <A DOT APPLEYARD AT fs2 DOT mt DOT umist DOT ac DOT uk>
Organization: Materials Science Centre
To: DJGPP AT DELORIE DOT COM
Date: Wed, 12 Jun 1996 15:04:00 GMT
Subject: RSX funny
Message-ID: <2BB2192337B@fs2.mt.umist.ac.uk>

  I am sorry if this subject is getting too faqqy for further tolerance, but:-
  I have go32 1.12 binutils 2.4 bison 1.22 diffutils 2.6 flex 2.4.7 gas 2.3
gcc 2.6.0 gdb 4.12 gzip 1.2.4 libg++-2.6.0 make-3.71 patch-2.1 sed-1.18
texinfo-3.10
  I am trying to compile using djgpp and RSX this beginner's Windows program
(which I call T$_.CC) that I typed in from a book that I bought:-

#define int short /**** the same happens whether I put this line in or not */
#include <windows.h>
/*-----*/
int WinMain(HINSTANCE hInst, HINSTANCE hPrev, LPSTR command, int n){
WinExec("NOTEPAD.EXE",SW_SHOWNORMAL); return 1;}

  I did everything that the file \RSXWDK\DOC\RSXWDK.HLP told me to.
  I compiled T$_.CC under plain DOS, not Windows or the Windows DOS box.
  But yet when I compile it, I get this fault remark:-

C:\RSXWDK>gcc t$_.cc -win -o a.w32
rsxw32.c(.text+0x137): undefined reference to `WinMain'

although hereinabove is the supposedly missing WinMain real as life and twice
as natural in my program file!!!! The allegedly unsatisfied reference to
WinMain() is in (the compiled form of) C:\RSXWDK\LIBSRC\WIN\RSXW32.C :-
 ...
int main(int argc,char **argv,char **env){
    rsxw32_init();	/* uninit at __exit() */
    __argc = argc;
    __argv = argv;
    __env = env;
    return  WinMain(
	    prg_info_block.hInst,
	    prg_info_block.hPrevInst,
	    prg_info_block.lpCmdLine,
	    prg_info_block.nCmdShow);}

  and it is duly declared in my WINDOWS.H as
   int WinMain(HINSTANCE, HINSTANCE, LPSTR, int);

- Raw text -


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