Boost logo

Boost Users :

Subject: Re: [Boost-users] [test] testing protected/private methods out of test suits
From: Jonathan Franklin (franklin.jonathan_at_[hidden])
Date: 2008-09-22 13:32:23


On Sun, Sep 21, 2008 at 2:23 AM, Juergen Hunold <juergen.hunold_at_[hidden]>wrote:

> On Friday 19 September 2008 21:37:01 trashing_at_[hidden] 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.

Jon



Boost-users list run by williamkempf at hotmail.com, kalb at libertysoft.com, bjorn.karlsson at readsoft.com, gregod at cs.rpi.edu, wekempf at cox.net