[Top][All Lists]
[Date Prev][Date Next][Thread Prev][Thread Next][Date Index][Thread Index]
Different object lists for static and shared libraries
From: |
Charles Wilson |
Subject: |
Different object lists for static and shared libraries |
Date: |
Sat, 27 Jun 2009 18:54:59 -0400 |
User-agent: |
Mozilla/5.0 (Windows; U; Windows NT 6.0; en-US; rv:1.8.1.22) Gecko/20090605 Thunderbird/2.0.0.22 Mnenhy/0.7.6.666 |
I have a library that I'm building using libtool. When built statically,
I want it to include a certain list of object files. When linking that
library dynamically, I want to add an additional object (windows
resources, compiled using windres).
I already have it working so that BOTH versions get the resource object
(e.g. special rules to invoke windres, etc). How can I exclude that
object from the static archive?
The best I could come up with is this: IN the source code for the object, do
----- top of file -----
#if defined(BUILDING_MY_LIBRARY) && defined(DLL_EXPORT)
stuff
#endif
----- end of file -----
This way, the object is included in both the static and shared
libraries, but in the former case it doesn't have any contents.
Is there a better way?
--
Chuck
- Different object lists for static and shared libraries,
Charles Wilson <=