Sign in Join

Live chat for Free Pascal, Lazarus, Delphi and every Pascal programmer.

Mailing lists / fpc-pascal / 2002-07

Cross compiling Linux -> Windows - how?

4 messages · 4 people · –

Reply by email Subscribe to this list Your subscription

Read-only archive. Use j and k to move between messages.

Rainer Hantsch

Hello!

I will possibly get an order to write a small program which does nothing else than printing exported block data from AutoCAD in a nice form. (Data are exported into a text file which is parsed and printed by my program.) Because this can be done without any user interface, it should be enough to use a simple windoze-console, where I print some status infos, nothing else...

Because I use 100% Linux, I would either have to install windoze somewhere, or, if possible, do the whole thing on FPC for Linux and do a compilation for a windoze-exe.

- Is this possible at all?
- What must I install in addition to my FPC 1.0.4 for Linux on my Linux machine to have the possibility for cross-compilation?

Another problem will be printing. Under Linux, this is trivial: Open a pipe to lpr and write out everything as PostScript. The rest is done by GhostScript and Linux....
How is this in Windows? I never wrote a windows application before! I heared from a friend that it is much more complicated!

- can somebody, please, send me simple program for seeing how this has to be done? (Open the windoze standard printer, choose a font, scale it, and simply write something onto the paper, maybe with 1-2 graphical elements (lines and/or gray shaded boxes, and/or print i.e. a blue box with a yellow text inside.)

That is plenty enough for what I need.

mfg

Ing. Rainer Hantsch

\\|// Ing. Rainer HANTSCH - Hardware + Software (o o) Forget Windoze! -- We focus on L-I-N-U-X... --oOOo-(_)-oOOo-------------------------------------------------- Ing. Rainer HANTSCH | e-Mail: Khunngasse 21/20 | www : http://www.hantsch.co.at A-1030 Vienna | Tel. : ++43 - 1 - 7988538 0 ---------------------| Fax : ++43 - 1 - 7988538 18 ** AUSTRIA ** | Mobile: ++43 - 664 - 9194382 -----------------------------------------------------------------

Reply by email

Jonas Maebe
to Rainer Hantsch
Rainer Hantsch wrote 5 lines
Because I use 100% Linux, I would either have to install windoze somewhere, or, if possible, do the whole thing on FPC for Linux and do a compilation for a windoze-exe. - Is this possible at all?

Yes.

- What must I install in addition to my FPC 1.0.4 for Linux on my Linux machine to have the possibility for cross-compilation?

You have to download the gnu binutils and configure/compile them for cross-compilation from linux to win32. Then you can tell, when compiling, the compiler using the -FD option in which directoey these utilities can be found.

Jonas

Reply by email

Sergey Korshunoff
to Jonas Maebe
Rainer Hantsch wrote 15 lines
> Because I use 100% Linux, I would either have to install windoze > somewhere, or, if possible, do the whole thing on FPC for Linux and do > a compilation for a windoze-exe. > > - Is this possible at all? Yes. > - What must I install in addition to my FPC 1.0.4 for Linux on my Linux > machine to have the possibility for cross-compilation? You have to download the gnu binutils and configure/compile them for cross-compilation from linux to win32. Then you can tell, when compiling, the compiler using the -FD option in which directoey these utilities can be found.

.> Jonas

I done this procedure at last month. I put utilities in /usr/local/bin, with names asw (this is as), ldw (this is ld), dlltool. And then
fpc -Twin32 qsort.pp
produce a qsort.exe.

Command to configure binutils is

./configure --target=i386-pc-winnt

Regards,
Sergey Korshunoff

Reply by email

jc
to Sergey Korshunoff
Show quoted text 9 lines
I done this procedure at last month. I put utilities in /usr/local/bin, with names asw (this is as), ldw (this is ld), dlltool. And then fpc -Twin32 qsort.pp produce a qsort.exe. Command to configure binutils is ./configure --target=i386-pc-winnt

Has anyone been successful compiling Linux binaries from under Windows?

Reply by email