
Jonathan Franklin writes:
On Friday 19 September 2008 21:37:01 trashing@gmx.net wrote:
I've exactly that problem with MSVC++7.x. Compiling the class_to_test in the library with protected methods and trying to access this methods out from the test_case_class by including the header and #define protected public, gives me a "symbol not found compiler error". :-/
Yes, that trick will not work with msvc because the access specifiers (public, protected, private) get into the mangled name in the lib. So you are out of luck here ;-((
The '#define private public' trick works for me using MSVS 2005 and static libraries.
I would swear that the standard indicated that public/private had no effect on visibility, just accessibility. That is, changing a symbol's access from private to public did not change the meaning of a program. Stroustrup uses such language in the D&E of C++. Obviously, Microsoft thinks differently. Cheers, -- Robert