apr-dev mailing list archives

Site index · List index
Message view « Date » · « Thread »
Top « Date » · « Thread »
From "Daniel May" <dan...@spryware.com>
Subject RE: Google Summer Of Code APR Applications
Date Tue, 02 May 2006 17:32:53 GMT
One method I have used in the past is to put the library references for
windows builds directly in a header file. 

For example, here is how I link in different version of a lib based on
the version of the Microsoft compiler:

#if defined(MYAPI_EXPORTS)
#	define MYAPI __declspec(dllexport)
#else
#   define MYAPI __declspec(dllimport)
#   if (_MSC_VER >= 1400)
#		if defined(_DEBUG)
#			pragma comment(lib,"MyApiVs80_d.lib")
#		else
#			pragma comment(lib,"MyApiVs80.lib")
#		endif
#   elif defined(_MSC_VER)
#		if defined(_DEBUG)
#			pragma comment(lib,"MyApi_d.lib")
#		else
#			pragma comment(lib,"MyApi.lib")
#		endif
#	endif 
#endif

You only need to define the lib path in the project.

/Daniel

 

-----Original Message-----
From: rooneg@gmail.com [mailto:rooneg@gmail.com] On Behalf Of Garrett
Rooney
Sent: Tuesday, May 02, 2006 12:22 PM
To: Walter Mundt
Cc: dev@apr.apache.org
Subject: Re: Google Summer Of Code APR Applications

On 5/2/06, Walter Mundt <emage@spamcop.net> wrote:
> As some of you are aware, the ASF is participating in the Google 
> Summer of Code, and two project ideas for work on APR are posted on 
> the ASF wiki.  I'm planning on submitting Summer of Code applications 
> for both (they look equally interesting to me), and I'd like some 
> feedback before I submit them.
>
> I've posted drafts of them on the aforementioned wiki at 
> http://wiki.apache.org/general/WalterMundt/SummerOfCodeProposals for 
> your perusal and flaming pleasure.  Anyone is welcome and encouraged 
> to read them and send me suggestions, either via this list or directly

> to my address.  Please note anything you'd like me to 
> add/improve/expand upon (aside from the logging API design, though 
> suggestions on how to approach that are welcome too!).
>
> I know the first proposal is pretty sketchy, but I'm not sure how much

> more there is to add; it's one of those things that's really easy to 
> describe even though it will be difficult to implement.

One thing that might be worth thinking about for the win32 build system
stuff is the ability to control what external libraries the system is
linked against.  For example, right now all that is hardcoded into the
dsp and .hw files, so changing it is a pain in the neck.  Once we have
something generating those .dsp files it would be really nice if it was
able to control, for example, whether we link against berkeley db or
not, or if we use apr-iconv, etc.

-garrett

Mime
View raw message