libftdi Archives

Subject: Re: libftdi-config --libs

From: Xiaofan Chen <xiaofanc@xxxxxxxxx>
To: libftdi@xxxxxxxxxxxxxxxxxxxxxxx
Date: Tue, 4 Sep 2012 07:51:39 +0800
On Tue, Sep 4, 2012 at 7:46 AM, Xiaofan Chen <xiaofanc@xxxxxxxxx> wrote:
>>
>> Shouldn't it be the contrary ?
>> I mean if you want to build a shared library, you have to pass all the
>> libraries containing the dso reference.
>> And if you build statically, all the symbols are included and you don't have
>> to pass any other libraries to link to.
>
> I am not an expert here but here are two links from libusb
> mailing list, saying to include the extra libraries in Libs.private
> in the pc file.
>
> http://libusb.6.n5.nabble.com/libusb-1-0-pc-files-when-static-linking-td43.html
> http://libusb.6.n5.nabble.com/How-to-use-static-linking-with-libusb-td5104747.html

Under Mac OS X, here is my libusb-1.0.pc file.

$ cat /usr/local/Cellar/libusb/HEAD/lib/pkgconfig/libusb-1.0.pc
prefix=/usr/local/Cellar/libusb/HEAD
exec_prefix=${prefix}
libdir=${exec_prefix}/lib
includedir=${prefix}/include

Name: libusbx-1.0
Description: C API for USB device access from Linux, Mac OS X, Windows
and OpenBSD/NetBSD userspace
Version: 1.0.12
Libs: -L${libdir} -lusb-1.0
Libs.private: -lobjc -Wl,-framework,IOKit -Wl,-framework,CoreFoundation
Cflags: -I${includedir}/libusb-1.0




-- 
Xiaofan

--
libftdi - see http://www.intra2net.com/en/developer/libftdi for details.
To unsubscribe send a mail to libftdi+unsubscribe@xxxxxxxxxxxxxxxxxxxxxxx   

Current Thread