Boost logo

Boost :

From: bill_kempf (williamkempf_at_[hidden])
Date: 2002-02-19 11:29:59


--- In boost_at_y..., Beman Dawes <bdawes_at_a...> wrote:
> At 01:13 AM 2/19/2002, Jason Shirk wrote:
> >> -----Original Message-----
> >> From: Beman Dawes [mailto:bdawes_at_a...]
> >>
> >> At 01:53 PM 2/18/2002, bill_kempf wrote:
> >>
> >> >> Can you put a specific check into the threadmod code to
give an
> >> >#error if
> >> >> it isn't being compiled as a DLL? Only to apply to
appropriate
> >> >compilers,
> >> >> of course. Would save a lot of grief, I'd expect.
> >> >
> >> >I'm not sure if there is a way to do this. If there is I'd
love to
> >> >hear about it.
> >>
> >> Hum... I was thinking that _DLL did it. But that specifies the
> >runtime
> >> library used, not what the target is.
> >>
> >> Jason? Any ideas?
> >>
> >
> >Sorry, there isn't a way to do that. The only define /LD adds is
_MT,
> >and that's used w/ /MT and /MD, so it doesn't help.
>
> Might be worth a new predefined macro. _DLL_TARGET or similar.
>
> Anything a compiler implementor can do that allows better error
detection
> is a win for users, and cuts support costs too.

The only problem is that, as someone else pointed out, this is a
linker concept not a compiler concept. I'm not sure the compiler
can determine that the target will be a DLL.

Bill Kempf


Boost list run by bdawes at acm.org, gregod at cs.rpi.edu, cpdaniel at pacbell.net, john at johnmaddock.co.uk