On Fri, Apr 17, 2009 at 2:23 PM, Hendrik Sattler <[email protected]>wrote:

> Am Freitag 17 April 2009 20:13:40 schrieb Shaun Cummins:
> > Thanks, that solves one problem. I still haven't found a way to create
> > both shared and static libraries by only compiling the source code
> > once (on Linux). I can generate both types of libraries in one make
> > command but each source file is compiled twice.
> >
> > Does anyone know how to do this?
>
> You cannot as one has is compile as PIC and one as non-PIC.


I've done this before in my pre-cmake days on Linux and didn't run into any
problems.  Obviously Windows is out in terms of reusing static object files
as shared libraries.  What about MacOSX and older Unix systems?  Can you
reuse code compiled with -fPIC in static libraries without any problems?

-- 
Philip Lowman
_______________________________________________
Powered by www.kitware.com

Visit other Kitware open-source projects at 
http://www.kitware.com/opensource/opensource.html

Please keep messages on-topic and check the CMake FAQ at: 
http://www.cmake.org/Wiki/CMake_FAQ

Follow this link to subscribe/unsubscribe:
http://www.cmake.org/mailman/listinfo/cmake

Reply via email to