Maybe, some of you have any experience cross-compiling for Wintel.
Suppose, I build a cross-compiler (running on Mac OS X) that compiles Windows code for i386.
(1) Do I need a cross-linker too ? How does the linker know about Win32 DLLs and LIBs to link with ? (2) Do produced executables run as native Windows GUI programs or DLLs (without a UNIX compatible shell installed) ? (3) Same question for DOS programs. (4) Are there any GPC Pascal interfaces to the Win32 API ? (5) What about cross-debugging with two machines ?
Regards,
Adriaan van Os
On 24 Jan 2003 at 16:30, Adriaan van Os wrote:
Maybe, some of you have any experience cross-compiling for Wintel.
Suppose, I build a cross-compiler (running on Mac OS X) that compiles Windows code for i386.
(1) Do I need a cross-linker too ? How does the linker know about Win32 DLLs and LIBs to link with ? (2) Do produced executables run as native Windows GUI programs or DLLs (without a UNIX compatible shell installed)
If you use the Mingw libraries and runtime (www.mingw.org), then you will get native Win32 programs. So you should get the Mingw 2.0.x environment. Unfortunately, it is distributed as a Win32 self extracting executable. I don't know if you can run that under Mac OS X.
? (3) Same question for DOS programs.
For real DOS you are looking for DJGPP libraries, not Mingw. Of course, native Win32 has a "console" mode, which looks similar to a DOS program.
(4) Are there any GPC Pascal interfaces to the Win32 API ?
Yes. Check on the GPC website (in /contrib/chief/) for the winapi files. These are being updated all the time - and the ones on the GPC site are a few months old (and I have fixed many things since then).
(5) What about cross-debugging with two machines ?
Dunno.
Best regards, The Chief -------- Prof. Abimbola A. Olowofoyeku (The African Chief) web: http://www.bigfoot.com/~african_chief/
Prof A Olowofoyeku (The African Chief) a écrit:
On 24 Jan 2003 at 16:30, Adriaan van Os wrote:
Maybe, some of you have any experience cross-compiling for Wintel.
? (3) Same question for DOS programs.
for DOS DJGPP needed files are contained in
ftp://ftp.simtel.net/pub/simtelnet/gnu/djgpp/v2/djcrx203.zip
(and mirrors) together with instructions to install and use the package (in the cross subdir). It has been widely used to cross-compile from linux, especially at the beginning of the project, when it was not mature enough to allow native compilation of serious packages. You will probably be the first to cross-compile from Mac OS
Good luck
Maurice
Adriaan van Os wrote:
Maybe, some of you have any experience cross-compiling for Wintel.
Not "Wintel", but {Linux, DJGPP} -> {Linux, DJGPP, Solaris}.
Suppose, I build a cross-compiler (running on Mac OS X) that compiles Windows code for i386.
(1) Do I need a cross-linker too ?
Yes (and assembler). Build a cross version of the binutils.
How does the linker know about Win32 DLLs and LIBs to link with ?
You must provide them, also some C system headers, usually in <prefix>/<target>/<include|lib>.
(2) Do produced executables run as native Windows GUI programs or DLLs (without a UNIX compatible shell installed) ?
AFAIK yes -- they should require no more and no less than natively compiled programs. I don't know what this is for Mingw (if anything); for DJGPP (Dos), it's only cwsdpmi for systems that don't have a suitable DPMI driver.
(3) Same question for DOS programs.
Same answers. ;-)
(4) Are there any GPC Pascal interfaces to the Win32 API ?
Yes, but the Chief can tell more about this.
(5) What about cross-debugging with two machines ?
Never tried this. gdb has some remote features, but I don't know how well they work.
Frank