• Open Menu Close Menu
  • Apple
  • Shopping Bag
  • Apple
  • Mac
  • iPad
  • iPhone
  • Watch
  • TV
  • Music
  • Support
  • Search apple.com
  • Shopping Bag

Lists

Open Menu Close Menu
  • Terms and Conditions
  • Lists hosted on this site
  • Email the Postmaster
  • Tips for posting to public mailing lists
Re: Linking problems with PostgreSQL
[Date Prev][Date Next][Thread Prev][Thread Next][Date Index][Thread Index]

Re: Linking problems with PostgreSQL


  • Subject: Re: Linking problems with PostgreSQL
  • From: Chris Ridd <email@hidden>
  • Date: Fri, 11 Jul 2003 10:22:28 +0100

On 11/7/03 10:01 am, jean Bousquet <email@hidden> wrote:

> Hello,
> It is the first time I use PostgreSQL in Cocoa. No problem in compiling but
> I have been stuck in linking. I get the following link error :
>
> ld: table of contents for archive: /usr/local/pgsql/lib/libpq.a is out of
> date; rerun ranlib(1) (can't load from it)
>
> I put a link from my libpq.a into the files of the project.
> My libpq.a file seems to be OK (its date = 19 june 2003 = date of my
> installation of postgresql 7.3.3, its size= 282 384 bytes).

Static libraries (.a files) have tables of contents apparently containing a
datestamp. If the date of the file is newer than the datestamp inside the
library (eg you copied the library), the linker complains with the message
you saw.

You shouldn't *need* to symlink from your project to the library, you should
just be able to add the library with its absolute path to the project. (As a
reference, not copying, etc etc.)

To fix the linker error go to the terminal and just run ranlib on the
library:

sudo ranlib /usr/local/pgsql/lib/libpq.a

Cheers,

Chris
_______________________________________________
cocoa-dev mailing list | email@hidden
Help/Unsubscribe/Archives: http://www.lists.apple.com/mailman/listinfo/cocoa-dev
Do not post admin requests to the list. They will be ignored.

References: 
 >Linking problems with PostgreSQL (From: jean Bousquet <email@hidden>)

  • Prev by Date: Re: Linking problems with PostgreSQL
  • Next by Date: Re: Sorting in an NSTableView
  • Previous by thread: Re: Linking problems with PostgreSQL
  • Next by thread: Re: Linking problems with PostgreSQL
  • Index(es):
    • Date
    • Thread