Your fpc.cfg file is ether not existing, in the wrong place or wrongly configured. I don't know where it should be on MacOSX but if you find it fix the -Fu entries so they point to right locations(note: $fpcversion etc. are variables, leave them as they are: for example in here:
-Fu/usr/local/lib/fpc/$fpcversion/units/*

Ales

Tom Verhoeff wrote:

I have a "standard release" installation of fpc 2.0.0 under Mac OS X.

I installed GTK through fink (as explained in the Lazarus wiki).
This has given me GTK 1.2.10.  No problems so far.

When I try to compile the following simple GTK Pascal tutorial program

PROGRAM base;

USES gtk;

VAR window : pGtkWidget;

BEGIN
 gtk_init(@argc, @argv); { Initialise GTK }
 window := gtk_window_new(GTK_WINDOW_TOPLEVEL);  { Create a new window }
 gtk_widget_show(window);
 gtk_main();
END.

with fpc, I need to add the following command-line options

        -Fl/sw/lib -Fl/usr/X11R6/lib

as well as

        -Fu/usr/local/lib/fpc/2.0.0/units/powerpc-darwin/gtk

The first two caught me by surprise, but some tracking resolved this.
However, under Linux, I don't need to specify further library locations.
How come?

Is there any documentation where this can be found?  Is there a place
where I can put this info in the FPCWiki?

But the need for -Fu is downright strange, because the "standard" /etc/fpc.cfg
(which I have not changed) has the line

        -Fu/usr/local/lib/fpc/2.0.0/units/$fpctarget/*

Why does it not find the gtk directory?  Under Linux it simply works.

In fact, when I try to compile Lazarus under Mac OS X with

        make clean all

it dies with

        Fatal: Can't find unit Contnrs

It should find the Contnrs unit in

        /usr/local/lib/fpc/2.0.0/units/powerpc-darwin/fcl

which should be searched because of the -Fu line shown above in /etc/fpc.cfg.

What is the problem?  And how can it be repaired?

Best regards,

        Tom

_______________________________________________
fpc-devel maillist  -  [email protected]
http://lists.freepascal.org/mailman/listinfo/fpc-devel

Reply via email to