[Top][All Lists]
[Date Prev][Date Next][Thread Prev][Thread Next][Date Index][Thread Index]
Re: C libraries in Mac version
From: |
Alexander Diemand |
Subject: |
Re: C libraries in Mac version |
Date: |
Mon, 23 Feb 2004 21:36:16 +0100 |
User-agent: |
KMail/1.5.4 |
Hi,
On the mac you should link to static libraries (lib*.a). This prevents the
Mach specific prelinking step when loading an executable with dynamically
linked libraries.
Try instead:
touch empty_test.pl
gplc empty_test.pl -L '/usr/lib/libcurl.a'
./empty_test
That works!
Alex.
On Monday 23 February 2004 20:02, William McCune wrote:
> I fetched gprolog-1.2.16.tar.gz and compiled and installed
> it on a Mac (Panther), using the default configurations.
> It seems to work consulting and compiling ordinary Prolog programs.
>
> However, I have a problem linking C code that calls library functions.
> I have narrowed it down to the following vacuous example, which
> shows the problem.
>
> % touch empty_test.pl
> % gplc empty_test.pl -L -lcurl
> % ./empty_test
> bus error
>
> Notes:
>
> 1. The curl library is not used in this example, and the same
> problem occurs with other libraries, e.g., -lm or -lssl.
> 2. This example works correctly if I omit '-L -lcurl'.
> 3. This example works correctly with the Linux binary RPM.
>
> Thanks for any help you can give.
>
> Bill
>
> ----------------------------------------------------------------
>
> | William McCune | e-mail: address@hidden |
> | MCS-221 | phone: +1-630-252-3065 |
> | Argonne National Laboratory | FAX: +1-630-252-5986 |
> | Argonne, IL 60439-4844 | |
> | U.S.A. | |
> | http://www.mcs.anl.gov/~mccune/ |
>
> ----------------------------------------------------------------
>
>
> _______________________________________________
> Users-prolog mailing list
> address@hidden
> http://mail.gnu.org/mailman/listinfo/users-prolog