P
Paul Edwards
I have written a public domain (not GPL etc) C runtime library
(PDPCLIB) for DOS, OS/2 and MVS. You can see it here:
http://sourceforge.net/projects/pdos/
I now wish to port it to Win32, so that I can create executables
to run under Windows 98 command prompt where every byte
of the executable is from public domain code.
I'm only interested in writing strictly conforming C89 programs,
ie TTY programs. PDPCLIB has no extensions.
I have gcc (egcs 2.91.57) installed, which came with Cygwin,
and I am happy to use gcc as my compiler, but I don't want to
use any GNU libraries. I basically want to implement
fopen/fread/etc by calling some Windows API, similar to OS/2.
I have done some reading on the web, and it would appear that
the equivalent of OS/2's DosOpen() is CreateFile(). What a
strange name for a function that opens existing files! So first
of all I would like to confirm that I've found the right API.
I found that here:
http://msdn.microsoft.com/library/d...n-us/fileio/fs/creating_and_opening_files.asp
Secondly, I'd like to know what process I need to use to start
writing applications that call these Win32 APIs without linking
in GNU libraries. If I just use gcc normally it will automatically
link in GNU libraries. I can use "gcc -nostdinc" to force gcc to
only pick headers up from my specified directories. How do I
force gcc to not link with the normal libraries? Do I need to
use "gcc -c" and "ld" myself? What is the syntax, so that I create
normal 32-bit Windows command line executables?
Also, how do I write to stdout via the Win32 API? Do I need
to do a CreateFile() or does a suitable handle already exist?
I'd like to get a "hello, world" program working first, to inspire
me to do the rest of the work.
I needed to write an assembler program in OS/2 as the executable
entry point. Do I need that for Win32 as well?
I've never done Windows programming before, so sorry for the
newbie questions. I'm really not sure how to get started.
Thanks. Paul.
(PDPCLIB) for DOS, OS/2 and MVS. You can see it here:
http://sourceforge.net/projects/pdos/
I now wish to port it to Win32, so that I can create executables
to run under Windows 98 command prompt where every byte
of the executable is from public domain code.
I'm only interested in writing strictly conforming C89 programs,
ie TTY programs. PDPCLIB has no extensions.
I have gcc (egcs 2.91.57) installed, which came with Cygwin,
and I am happy to use gcc as my compiler, but I don't want to
use any GNU libraries. I basically want to implement
fopen/fread/etc by calling some Windows API, similar to OS/2.
I have done some reading on the web, and it would appear that
the equivalent of OS/2's DosOpen() is CreateFile(). What a
strange name for a function that opens existing files! So first
of all I would like to confirm that I've found the right API.
I found that here:
http://msdn.microsoft.com/library/d...n-us/fileio/fs/creating_and_opening_files.asp
Secondly, I'd like to know what process I need to use to start
writing applications that call these Win32 APIs without linking
in GNU libraries. If I just use gcc normally it will automatically
link in GNU libraries. I can use "gcc -nostdinc" to force gcc to
only pick headers up from my specified directories. How do I
force gcc to not link with the normal libraries? Do I need to
use "gcc -c" and "ld" myself? What is the syntax, so that I create
normal 32-bit Windows command line executables?
Also, how do I write to stdout via the Win32 API? Do I need
to do a CreateFile() or does a suitable handle already exist?
I'd like to get a "hello, world" program working first, to inspire
me to do the rest of the work.
I needed to write an assembler program in OS/2 as the executable
entry point. Do I need that for Win32 as well?
I've never done Windows programming before, so sorry for the
newbie questions. I'm really not sure how to get started.
Thanks. Paul.