
"Gennadiy Rozental" <gennadiy.rozental@thomson.com> wrote in message news:cvknno$qip$1@sea.gmane.org...
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).
That would mean changing a semantic from the one I currently support on Unix(s). Though it would be what I prefer to do either.
Also?
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.
So you are saying there is no way to have external reference in DLL?
I'm saying that, to the best of my knowledge, there is no such way. All referenced must be resolved at link-time, either defined in the DLL itself or in other DLLs via imports.
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)?
AFAIK main in static libs works everythere.
I definitely had a problem on DEC C++ 6.5-<something> on OpenVMS Alpha. Linking would appear to work normally, but the application always bombed on startup until I moved main into my application. It might have been possible to resolve using some special compiler and/or linker settings, but I was under pressure to get things working. // Johan