[fpc-pascal] FreePascal in a FreeBSD
Marco van de Voort
marcov at stack.nl
Fri Jan 13 10:28:06 CET 2006
> I'm trying compile a project using FreePascal (2.0.2 [2005/11/17] for i386)
> in a FreeBSD 4.1.
That's an old one (the FreeBSD I mean)
> I can compile this project in Delphi (in a Windows) and Kylix (in a Debian),
> but infortunatelly I can't compile this project using FreePascal/FreeBSD.
That's because you
1) use OS specific units for something not OS specific.
-> Best solution: use sysutils.getenvironmentvariable
2) For the *nix case, you use a Kylix compability unit (libc) which, like
Kylix, is linux/i386 only.
-> if you want to do this use baseunix.fpgetenv
> to use the getenv function.
>
> What the correspondent for FreeBSD to Libc?
Baseunix. Use this on Linux also, unit libc is only for keeping sourcebases
Kylix compatible, and it is not recommended for portable application
development.
More information about the fpc-pascal
mailing list