Boost logo

Boost :

From: Johan Nilsson (johan.nilsson_at_[hidden])
Date: 2005-02-24 03:17:29


"Gennadiy Rozental" <gennadiy.rozental_at_[hidden]> wrote in message
news:cvhbfi$7pu$1_at_sea.gmane.org...
> Hi,
>
> I am trying to finally implement DLL version of Boost.Test components.
> Here
> is several issues/questions I have:
>

[...]

>
> 2. main() function again
>
> On unix(s) there is a possibility to put main info dlls (If I am wrong
> please correct me). Should we use different semantic for Windows and
> Unix(s)
> or use the one I implement for windows?

I don't know about the specifics, but I'd definitely prefer the same
semantics (at least from the "end" user's point of view).

>
> 3. init_unit_test_suite
>
> I need to call external function from inside of DLLs. How it should be
> declared? Cause I am getting unresolved symbols error

Linking the DLL isn't different from linking an EXE in this case. You can't
link the DLL without having the function definition available at link time.

You could solve this using callbacks, but as a DLL can't define main anyway,
what are you actually trying to do? Would it be an alternative to have
Boost.Test as a DLL, minus the definition of main, which could be provided
by e.g. an object (or a static library, but IIRC there's a problem with
having main's defined in static libraries on certain compilers/platforms -
the linker doesn't recognize there's a main at all)?

Just thinking out loud.

// Johan


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