Skip site navigation (1) Skip section navigation (2)

Linker Confusion.....

From: osxdeveloper(at)mac(dot)com
To: pgsql-interfaces(at)postgresql(dot)org
Subject: Linker Confusion.....
Date: 2009-07-23 20:19:22
Message-ID: (view raw, whole thread or download thread mbox)
Lists: pgsql-interfaces

I am wirting an application that uses the libpq interface to access  
the PostgreSQL database. My system is Mac OS X.

I have set up my project in Xcode and everything works fine. DB access  
is flawless and very fast. But I often like to dig deeper into things  
to get knowledge on how things work. What confuses me is, when I use  
otool to inspect my executable, I get the information that my app is  
linked against libpq.5.dylib (which is a symlink to libpq.5.1.dylib),  
which is probably the dynamic library that does the work in  
communicating with the database server.
But what I don't understand: In my Xcode project, I have put libpq.a  
(and not libpq.5.dylib!)  into the linked frameworks of my project and  
the project is build against it.
How does the linker know to link against libpq.5.dylib when libpq.a is  
the only lib in my project?

I hope my problem description is not too confusing....

Thank you for any answer and thank you to the PostgreSQL team for the  
great database! ;-)

Best regards,

pgsql-interfaces by date

Next:From: Tom LaneDate: 2009-07-23 21:39:39
Subject: Re: Linker Confusion.....
Previous:From: Ralf HasemannDate: 2009-07-23 19:47:06
Subject: Linker Confusion.....

Privacy Policy | About PostgreSQL
Copyright © 1996-2017 The PostgreSQL Global Development Group