Hi to all,
I'm writing a project in Visual C++ 2010 Express edition. Everything was fine before i tried to add new source file in the project. Then when i tried to include one of the header files the compiler said that the class declared in this header is not found in other source file which includes the same header file.
This is output from build. I've added #pragma message in each header file to see when it is included.
1>------ Build started: Project: OSGF, Configuration: Debug Win32 ------
1> OSGFComponentManager.cpp
1> OSGFComponentManager.h included
1> OSGFComponent.h included
1> Game.h included
1> GameTimer.h Included
1> ScreenText.h included
1> OSGFDrawableComponent.h icluded
1>d:\myprograms\osgf\osgf\osgfdrawablecomponent.h(7): error C2504: 'OSGFComponent' : base class undefined
1>d:\myprograms\osgf\osgf\osgfdrawablecomponent.h(10): error C2061: syntax error : identifier 'Game'
1>d:\myprograms\osgf\osgf\osgfdrawablecomponent.h(10): error C2065: 'game' : undeclared identifier
1>d:\myprograms\osgf\osgf\osgfdrawablecomponent.h(12): error C2614: 'OSGFDrawableComponent' : illegal member initialization: 'OSGFComponent' is not a base or member
1>d:\myprograms\osgf\osgf\osgfdrawablecomponent.h(16): error C2027: use of undefined type 'OSGFComponent'
1> d:\myprograms\osgf\osgf\osgfdrawablecomponent.h(4) : see declaration of 'OSGFComponent'
1>d:\myprograms\osgf\osgf\screentext.h(11): error C2061: syntax error : identifier 'Game'
1> Generating Code...
1> Compiling...
1> Main.cpp
1> Test.h included
1> Game.h included
1> GameTimer.h Included
1> ScreenText.h included
1> OSGFDrawableComponent.h icluded
1> OSGFComponent.h included
1> Generating Code...
1> Compiling...
1> Test.cpp
1> Test.h included
1> Game.h included
1> GameTimer.h Included
1> ScreenText.h included
1> OSGFDrawableComponent.h icluded
1> OSGFComponent.h included
1> Generating Code...
========== Build: 0 succeeded, 1 failed, 0 up-to-date, 0 skipped ==========