Boost logo

Boost :

From: Jonathan Turkanis (technews_at_[hidden])
Date: 2005-02-25 00:52:36


Edward Diener wrote:
> Jonathan Turkanis wrote:

>> I think Gennadiy wants the dll code to call a user-defined function,
>> and the problem is that if you declare the function and then leave it
>> undefined the linker complains, even though this works fine with
>> static linking, since the user supplies the definition and the linker
>> sees everything at once.
>
> OK, but would it not be better just to use boost::function<> to allow
> the user to pass in a user-defined function at run-time from wherever
> he chooses ? This is much more flexible than attempting to declare a
> user-defined function in a Dll which the end-user is supposed to
> define and depend on compile/link to resolve it..

This is really a question for Gennadiy, but I believe the answer is that he
wants the use of the library as a dll to be as close as possible to the current
use as a static library.

Jonathan


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