[Top][All Lists]

[Date Prev][Date Next][Thread Prev][Thread Next][Date Index][Thread Index]

Static Library Linking Issue

From: Gavin Norman
Subject: Static Library Linking Issue
Date: Mon, 24 Nov 2008 20:30:26 +1100

I'm trying to link a module library that can be used for dlopen against a static lib. This is the issue I get:

/usr/local/bin/libtool --mode=link c++ -O2 -pipe -g -Wall -Wno-write-strings -DOPENBSD -pedantic -Wno-long-long -pthread -L/usr/local/lib -lexecinfo -lssl -lcrypto -o -rpath /usr/local/lib/zarafa -module ldapplugin_la-LDAPUserPlugin.lo ldapplugin_la-ldappasswords.lo ../../common/ -lldap -liconv

*** Warning: This system can not link to static lib archive ../../common/
*** I have the capability to make that library automatically link in when
*** you link to this library. But I can only do this if you have a
*** shared version of the library, which you do not appear to have.
*** But as you try to build a module library, libtool will still create
*** a static module, that should work as long as the dlopening application
*** is linked with the -dlopen flag to resolve symbols at runtime.
ar cru .libs/ldapplugin.a ldapplugin_la-LDAPUserPlugin.o ldapplugin_la-ldappasswords.o
ranlib .libs/ldapplugin.a

I is created as a static library. A few suggestions from OpenBSD porters have been to add -fPIC to flags. I've added this to the LDFLAGS, CPPFLAGS, CXXFLAGS & CFLAGS for with no success.

Gavin Norman
E: address@hidden

reply via email to

[Prev in Thread] Current Thread [Next in Thread]