Sebastian G√ľnther sguenther at gmx.de
Tue Sep 12 21:50:21 CEST 2000

Javier Ros wrote:
> >From the manuals it seems that fpc is itself a croscompiler.
> I would like to generate win32 executables from linux using v1.0 of the
> fpc compiler.
> Is it posible?

It is possible, I did it for myself some time ago, but it would be nice
if one of the other core developers could repeat the necessary changes,
as I've forgot them for myself :) Especially as I wanted to test some
things on Windows for myself, but Linux is my primary development
platform. The things I can remember can be found downwards.

> At this moment I'm using the -Twin32 directive, but ppc386-Twin32
> helloworld.pp complains about syswin32 unit missing.
> So I supouse that I have to install? (generate?) the win32 units. and
> thats all?

No, you need to have the assembler, linker etc. for Win32 installed.
There are rumours that a cross-compiling package is available somewhere,
but I never found it... But you can compile the GNU linker and similar
tools for cross-compiling/linking for yourself, there are instructions
for doing this in the according package. (binutils, I think). But be
careful, the assembler must have the name 'asw', and so on.

(The following stuff may be outdated:)
Another problem is that FPC itself doesn't have the COFF writer included
in the Linux version. When compiling a new compiler for yourself,
undefine some symbols by appending "-uNOAG386INT -uNOAG386BIN" to the
command line. I.e. do something like this:
  make OPT="-uNOAG386INT -uNOAG386BIN" clean all install

But as I would had to try this out for myself within the next few days
anyway, perhaps we can find a working solution even today. I'll post
another mail then...

- Sebastian

More information about the fpc-devel mailing list