Boost logo

Boost-Build :

Subject: Re: [Boost-build] How to build a lib and exe with same name
From: Nogradi, Chris (Chris.Nogradi_at_[hidden])
Date: 2012-11-10 11:14:04


On Thursday, October 18, 2012 5:24 AM, Jichao wrote:
> lib calc : basic_calc.c advance_calc.c calc.h ; exe calc : app.c calc
>
> I want calc.dll(with calc.lib) and calc.exe, but failed.
> If change exe calc to exe test then everything is ok.
> But if change to exe calc: app.c : <lib>calc ; , then boost.build will
> only build the library.

Try using this for exe:

lib calc : basic_calc.c advance_calc.c calc.h ;
exe calc.exe : app.c calc ;

The problem was that you had two targets with the same name (calc) and that means that they are alternates i.e. boost will either build the lib or the exe when building the calc target. The .exe extension above is not used by boost build except for conveniently distinguishing to targets that should be names the same.

Chris

________________________________

This e-mail and any attachments may contain confidential material for the sole use of the intended recipient. If you are not the intended recipient, please be aware that any disclosure, copying, distribution or use of this e-mail or any attachment is prohibited. If you have received this e-mail in error, please contact the sender and delete all copies.

Thank you for your cooperation.


Boost-Build list run by bdawes at acm.org, david.abrahams at rcn.com, gregod at cs.rpi.edu, cpdaniel at pacbell.net, john at johnmaddock.co.uk