That seems you need to referring the namespace accordingly. For example, following yyy.h and test.cpp have the same problem as yours:
//yyy.h
#ifndef YYY_H__
#define YYY_H__
namespace Yyy {
class CP_M_ReferenceCounted
{
};
}
#endif
//test.cpp
#include "yyy.h"
typedef CP_M_ReferenceCounted FxRC;
int main(int argc, char **argv)
{
return 0;
}
The error would be
...error: CP_M_ReferenceCounted does not name a type
But add a line "using namespace Yyy;" fixs the problem as below:
//test.cpp
#include "yyy.h"
// add this line
using namespace Yyy;
typedef CP_M_ReferenceCounted FxRC;
...
So please check the namespace scope in your .h headers.