[fpc-pascal] Basically on the right track?

Michael Van Canneyt michael at freepascal.org
Thu Dec 27 11:22:50 CET 2012



On Mon, 24 Dec 2012, Patrick wrote:

> Hi Everyone
>
> This is my first post here.
>
> I have NOT read all the documentation, please forgive this but I was hoping 
> to ask a couple of questions to make sure I am on the right track before 
> diving into Pascal.
>
> I fell in love with Ada about 14 months ago. Including the cardboard box, i 
> now have 53lbs of Ada books(A few still to read), I am planning on diving 
> into Pascal in this way too and  I want to mix Ada and Pascal. I found an 
> example on the web last night and it looks easy. The only thing is the 
> example used the gnu pascal compiler,
>
> Question 1:
> Can fpc create gcc compatible object code ?

gcc can use the object files. This is not a problem.

But things are not that simple. 
The FPC codebase requires certain symbols to be present, 
depending on the code you create.

These symbols are usually only generated when you create a program or library.

It means your ada project will have to
a) provide these symbols
b) initialize them correctly.

>
> or
>
> Question 2:
> alternatively can gpc be used to compile the gtk binding?

The FPC list is the wrong list to ask that :)

>
>
> 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,

Sounds like you don't have the -dev packages installed.
Simply installing those will fix the issue. 
I would not recommend fiddling with links yourself.

>
> 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.

What do you mean with this question ?

Michael.



More information about the fpc-pascal mailing list