libtool
[Top][All Lists]
Advanced

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

Re: Separate CPPFLAGS for static and shared libs


From: Roumen Petrov
Subject: Re: Separate CPPFLAGS for static and shared libs
Date: Wed, 04 Jun 2008 22:14:38 +0300
User-agent: Mozilla/5.0 (X11; U; Linux i686; en-US; rv:1.8.1.13) Gecko/20080329 SeaMonkey/1.1.9

Vincent Torri wrote:


On Wed, 4 Jun 2008, Ralf Wildenhues wrote:

* Vikram Ambrose wrote on Wed, Jun 04, 2008 at 03:54:35PM CEST:

However I need to pass separate CPPFLAGS to the objects destined for the
shared library as opposed to the objects destined for the library
archive.

As Andreas already replied, just use "#ifdef PIC" for shared and
"#ifndef PIC" for static code.  That usually works.

I think that it will not work with MinGW. But then you can use DLL_EXPORT.

Vincent Torri

-DPIC is defined in conjunction with -DDLL_EXPORT

Roumen




reply via email to

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