[unixODBC-dev] Linking Static Lib(UnixODBC) In Another Static Lib(libodbc++-mt.a)

Nick Gorham nick at lurcher.org
Tue May 28 09:22:54 BST 2013

On 27/05/13 10:59, Prabu RM wrote:
> Hi Support,
> In linux linking a static lib to another static is not so easy and we 
> believe that it is not supported. In order to achieve that we need to 
> extract both the .a separately to their objects and need to make them 
> single.
> But in UnixODBC/LibODBC we used to keep our application which binds 
> both UnixODBC & LibODBC in static.
> Eg: /usr/local/lib/libodbc++-mt.a, /usr/local/lib/libodbc.a
> The connectivity b/w our application and MySQL server looks like below.
> *Application Binary(c++) -> LibODBC -> UnixODBC -> MySQL Driver -> 
> MySQL Server*
> *
> *
> If so how do you link *UnixODBC Static Lib(*libodbc.a*) *in*LibODBC 
> Static Lib(*libodbc++-mt.a*) creation?*

As you say at the start of the email, you can't. All you could do is 
create a combined lib containing the contents of libodbc.a and libodbc++.a.

BTW, remember that statically linking to your application does not 
remove the GPL requirements of using the lib in your application.

Also BTW, you should join the list before posting.

-------------- next part --------------
An HTML attachment was scrubbed...
URL: <http://mailman.unixodbc.org/pipermail/unixodbc-dev/attachments/20130528/0f3587c8/attachment.html>

More information about the unixODBC-dev mailing list