<div class="gmail_quote">On Fri, Apr 17, 2009 at 2:23 PM, Hendrik Sattler <span dir="ltr">&lt;<a href="mailto:post@hendrik-sattler.de">post@hendrik-sattler.de</a>&gt;</span> wrote:<br><blockquote class="gmail_quote" style="border-left: 1px solid rgb(204, 204, 204); margin: 0pt 0pt 0pt 0.8ex; padding-left: 1ex;">
Am Freitag 17 April 2009 20:13:40 schrieb Shaun Cummins:<br>
<div class="im">&gt; Thanks, that solves one problem. I still haven&#39;t found a way to create<br>
&gt; both shared and static libraries by only compiling the source code<br>
&gt; once (on Linux). I can generate both types of libraries in one make<br>
&gt; command but each source file is compiled twice.<br>
&gt;<br>
&gt; Does anyone know how to do this?<br>
<br>
</div>You cannot as one has is compile as PIC and one as non-PIC.</blockquote><div><br>I&#39;ve done this before in my pre-cmake days on Linux and didn&#39;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?<br>
<br></div></div>-- <br>Philip Lowman<br>