C++ header file inclusion error
<p>I have a header "myHeaderFile.h" file looks as below which is used by both release exe and unit test exe.</p>

<pre><code>#ifndef MYHEADERFILE_H
#define MYHEADERFILE_H

namespace myname1
{
namespace myname2
{
    class A
    { 
           ...
    };
#ifdef MYTESTCLASS
    class TestABase
    {
        ...
    }
#endif
}
}
#endif
</code></pre>

<p>Now we have for unittest file myUnitTest.h file file as below</p>

<pre><code>#ifndef MYUNITEST_H
#define MYUNITTEST_H

#ifndef MYTESTCLASS
#define MYTESTCLASS  1
#endif 
#include "myHeaderFile.h"
class TestClass : public myname1::myname2::TestABase
{
  ...
};
#endif
</code></pre>

<p>now in myUnitTest.cpp i have following</p>

<pre><code>#include "myUnitTest.h"

// Definition stuff.
</code></pre>

<p>When i compile i am getting error as error C2039: TestABase: is not a member of myname1::myname2'
myUnitTest.h(31): error C2504: TestABase: base class undefined</p>

<p>what is causing above error? Please help me in resolving above error. Note: myHeaderFile.h comes from library so i cannot change this header file.</p>

<p>Thanks!</p>
