[fpc-pascal] Re: Interfacing with the free pascal compiler ?

Guillermo Martínez Jiménez gmjimen at burdjia.com
Tue Feb 12 11:09:01 CET 2008


Esteemed Skybuck,

I've read your messages and I think you didn't understood what Free
Pascal is (or may be I didn't understood your questions).

Free Pascal is an Object Pascal compiler, like Delphi, so it's mostly
compatible with it but they're quite different since FP doesn't
include a RAD IDE nor a component library. They have also some
internal differences as compilers; i.e. Delphi creates GUI
applications by default while FPC creates console applications by
default, also FPC doesn't support the <USES unitname AT
"path/unitname.pas"> construction, Delphi can't manage exported
variables from dynamic linking modules (DLL, so, dylib...) but FPC
does it, etc.

If you're looking for a cross-platform RAD IDE with a component
library to use with it you should try Lazarus
(http://www.lazarus.freepascal.org/), which is a RAD IDE that uses
Free Pascal and includes a library which is similar than the VCL. But
remember that Lazarus isn't Delphi. There are libraries you can use
with Delphi that are compatible with FPC/Lazarus (such as Indy,
JEDI/SDL or Allegro.pas) but there are a lot of them that aren't.

There's also a copyright problem. Most of the Delphi Library is open
sourced, but the license forces to use that sources only with
Borland/Code Gear's compilers. So it isn't "possible to pass Delphi
classes to Free pascal libraries" (well, it is possible but you
mustn't). The other way (use FPC/Lazarus libraries and classes in
Delphi) YES IT IS possible.

I hope that helps in your quest.

Guillermo "Ñuño" Martínez

> Hello,
>
> Is there a special way to interface with the free pascal compiler, for
> example via a DLL/API ?
>
> Or is an IDE supposed to interface via the FPC executable, command line
> parameters, and input files and console output with possibly output
> re-direction to files or so ?
>
> For example, I build a small IDE and now I would like to do something for
> example:
>
> 1. Get a list of files tried by the compiler so I don't have to compile
> those again.
>
> 2. Get a list of error messages, possibly per tried file, or simply one big
> file for chronological programming mistakes.
>
> Bye,
>   Skybuck.



More information about the fpc-pascal mailing list