Sign in Join

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

Mailing lists / fpc-pascal / 2005-01

Free Pascal, Dos, Cross compiling, Etc

3 messages · 3 people · –

Reply by email Subscribe to this list Your subscription

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

Unknown author

Hi,

I just downloaded Free Pascal 1.9.6 for Win32. (fpc-1.9.6.i386-win32.zip)

Unzipped it, Installed it and added the thing to the end of the path etc.

I would like to compile a simple Hello World program to all targets.

Apperently I can only compile/link/build to the win32 target :( !

I would like to compile the hello world example so that it can be run from ms-dos 6.22 as well.

Sigh.

Since I now have a BIGGGGG harddisk 120 Gigabytes ;) I would simply like to download a free pascal cross compiler binary/zip/distribution which has everything needed to compile to ALL TARGETS !

Does such a distribution of free pascal already exist ?

Or do I now have to start building my own free pascal cross compiler for every target ?!?

Bye,
Skybuck.

Reply by email

Florian Klaempfl
to Unknown author
Show quoted text 20 lines
Hi, I just downloaded Free Pascal 1.9.6 for Win32. (fpc-1.9.6.i386-win32.zip) Unzipped it, Installed it and added the thing to the end of the path etc. I would like to compile a simple Hello World program to all targets. Apperently I can only compile/link/build to the win32 target :( ! I would like to compile the hello world example so that it can be run from ms-dos 6.22 as well. Sigh. Since I now have a BIGGGGG harddisk 120 Gigabytes ;) I would simply like to download a free pascal cross compiler binary/zip/distribution which has everything needed to compile to ALL TARGETS ! Does such a distribution of free pascal already exist ?

No. It could only exist if somebody offers an approbriate mirror :)

Or do I now have to start building my own free pascal cross compiler for every target ?!?

Yes.

Reply by email

Tomas Hajny
to Florian Klaempfl

On Tue, 18 Jan 2005 18:03:57 +0100, Florian Klaempfl wrote

Show quoted text 29 lines
wrote: > Hi, > > I just downloaded Free Pascal 1.9.6 for Win32. (fpc-1.9.6.i386-win32.zip) > > Unzipped it, Installed it and added the thing to the end of the path etc. > > I would like to compile a simple Hello World program to all targets. > > Apperently I can only compile/link/build to the win32 target :( ! > > I would like to compile the hello world example so that it can be run from > ms-dos 6.22 as well. > > Sigh. > > Since I now have a BIGGGGG harddisk 120 Gigabytes ;) I would simply like to > download a free pascal cross compiler binary/zip/distribution which has > everything needed to compile to ALL TARGETS ! > > Does such a distribution of free pascal already exist ? No. It could only exist if somebody offers an approbriate mirror :) > > Or do I now have to start building my own free pascal cross compiler for > every target ?!? Yes.

Well, you certainly don't need FPC cross-compiler for every target. Every FPC native compiler can generate code for all supported targets on the same CPU. This means that e.g. an i386-win32 compiler (that one you downloaded) can compile for all of Win32, GO32v2 (DOS), OS/2, Linux, FreeBSD, Netware and NetwLibc. However, for this to work you either need cross GNU binutils, or only generate assembler files using -s compiler parameter and assemble and link on the target platform. Quite a few pre-built cross binutils packages can be downloaded from ftp://ftp.freepascal.org/pub/fpc/contrib/cross, for the particular case of GO32v2 you can _in_some_cases_ take the advantage of ability of Windows to run DOS apps and use aslddos.zip distributed with the DOS release (it is _not_ guaranteed to work, though - there are limitations). In addition, you might need some libraries from the target system if such packages are used in the program being compiled.

Tomas

Reply by email