On 24.12.2012 20:26, Patrick wrote:
Question 1: Can fpc create gcc compatible object code ?
As FPC can use GCC created object code the other way round should be possible, too. You only need to pay attention that FPC mangles the identifers. So a function "Bar(aArg: Integer): Integer" in unit "Foo" will in the object code have a name of something like "FOO_$$_BAR$INTEGER". So if you want to use Pascal functions from another language you should add a "[public: 'Bar']" after the function's declaration so that you can use the function by the name 'Bar'.
Question 2: alternatively can gpc be used to compile the gtk binding?
I don't use GPC and thus can't comment on it. AFAIK GPC also relies on a quite old GCC version (3.x).
I am having some trouble compiling gtk pascal examples, the linker can't find -lgtk etc. It looks like it is a naming issue and I can create links to get myself out of trouble however,
Which GTK examples? Are you trying GTK (aka GTK 1) or GTK+ (aka GTK 2) examples? You need to have the correct development library installed for them (especially important if you are on a deb-based system like Debian or Ubuntu).
Question 3: Is it possible to specify the libraries to use to fpc ? In Ada we have .gpr files that can list where things are to be found.
FPC relies on the search paths that the system knows. You can specify additional paths using "-Fl/path" and then those paths will be searched first.
Regards, Sven _______________________________________________ fpc-pascal maillist - fpc-pascal@lists.freepascal.org http://lists.freepascal.org/mailman/listinfo/fpc-pascal