MFC sample Just Keep in my program after i have problem

Hi. Just few days, i met the problem. it's like down side

d:\c++ programming\mfc\ascent\ascent\geomsources.cpp(116) : error C2065: 'Handle_ISession_Point' : undeclared identifier
1>d:\c++ programming\mfc\ascent\ascent\geomsources.cpp(116) : error C2146: syntax error : missing ';' before identifier 'aGraphicPoint'
1>d:\c++ programming\mfc\ascent\ascent\geomsources.cpp(116) : error C2065: 'aGraphicPoint' : undeclared identifier
1>d:\c++ programming\mfc\ascent\ascent\geomsources.cpp(116) : error C2061: syntax error : identifier 'ISession_Point'
1>d:\c++ programming\mfc\ascent\ascent\geomsources.cpp(117) : error C2065: 'aGraphicPoint' : undeclared identifier
1>d:\c++ programming\mfc\ascent\ascent\geomsources.cpp(120) : error C2065: 'aGraphicText' : undeclared identifier
1>d:\c++ programming\mfc\ascent\ascent\geomsources.cpp(132) : error C2065: 'Handle_ISession_Point' : undeclared identifier
1>d:\c++ programming\mfc\ascent\ascent\geomsources.cpp(132) : error C2146: syntax error : missing ';' before identifier 'aGraphicPoint'
1>d:\c++ programming\mfc\ascent\ascent\geomsources.cpp(132) : error C2065: 'aGraphicPoint' : undeclared identifier
1>d:\c++ programming\mfc\ascent\ascent\geomsources.cpp(132) : error C2061: syntax error : identifier 'ISession_Point'
1>d:\c++ programming\mfc\ascent\ascent\geomsources.cpp(133) : error C2065: 'aGraphicPoint' : undeclared identifier
1>d:\c++ programming\mfc\ascent\ascent\geomsources.cpp(136) : error C2065: 'aGraphicText' : undeclared identifier
1>d:\c++ programming\mfc\ascent\ascent\geomsources.cpp(144) : error C2065: 'Handle_ISession2D_Curve' : undeclared identifier
1>d:\c++ programming\mfc\ascent\ascent\geomsources.cpp(144) : error C2146: syntax error : missing ';' before identifier 'aGraphicCurve'
1>d:\c++ programming\mfc\ascent\ascent\geomsources.cpp(144) : error C2065: 'aGraphicCurve' : undeclared identifier
1>d:\c++ programming\mfc\ascent\ascent\geomsources.cpp(144) : error C2061: syntax error : identifier 'ISession2D_Curve'
1>d:\c++ programming\mfc\ascent\ascent\geomsources.cpp(145) : error C2065: 'aGraphicCurve' : undeclared identifier
1>d:\c++ programming\mfc\ascent\ascent\geomsources.cpp(145) : error C2227: left of '->SetColorIndex' must point to class/struct/union/generic type
1> type is ''unknown-type''
1>d:\c++ programming\mfc\ascent\ascent\geomsources.cpp(146) : error C2065: 'aGraphicCurve' : undeclared identifier
1>d:\c++ programming\mfc\ascent\ascent\geomsources.cpp(154) : error C2065: 'Handle_ISession2D_Curve' : undeclared identifier
1>d:\c++ programming\mfc\ascent\ascent\geomsources.cpp(154) : error C2146: syntax error : missing ';' before identifier 'aGraphicCurve'
1>d:\c++ programming\mfc\ascent\ascent\geomsources.cpp(154) : error C2065: 'aGraphicCurve' : undeclared identifier
1>d:\c++ programming\mfc\ascent\ascent\geomsources.cpp(154) : error C2061: syntax error : identifier 'ISession2D_Curve'
1>d:\c++ programming\mfc\ascent\ascent\geomsources.cpp(155) : error C2065: 'aGraphicCurve' : undeclared identifier
1>d:\c++ programming\mfc\ascent\ascent\geomsources.cpp(155) : error C2227: left of '->SetDisplayCurbure' must point to class/struct/union/generic type
1> type is ''unknown-type''
1>d:\c++ programming\mfc\ascent\ascent\geomsources.cpp(156) : error C2065: 'aGraphicCurve' : undeclared identifier
1>d:\c++ programming\mfc\ascent\ascent\geomsources.cpp(156) : error C2227: left of '->SetDiscretisation' must point to class/struct/union/generic type
1> type is ''unknown-type''
1>d:\c++ programming\mfc\ascent\ascent\geomsources.cpp(157) : error C2065: 'aGraphicCurve' : undeclared identifier
1>d:\c++ programming\mfc\ascent\ascent\geomsources.cpp(157) : error C2227: left of '->SetColorIndex' must point to class/struct/union/generic type
1> type is ''unknown-type''
1>d:\c++ programming\mfc\ascent\ascent\geomsources.cpp(158) : error C2065: 'aGraphicCurve' : undeclared identifier
1>d:\c++ programming\mfc\ascent\ascent\geomsources.cpp(166) : error C2065: 'Handle_ISession_Curve' : undeclared identifier
1>d:\c++ programming\mfc\ascent\ascent\geomsources.cpp(166) : error C2146: syntax error : missing ';' before identifier 'aGraphicCurve'
1>d:\c++ programming\mfc\ascent\ascent\geomsources.cpp(166) : error C2065: 'aGraphicCurve' : undeclared identifier
1>d:\c++ programming\mfc\ascent\ascent\geomsources.cpp(166) : error C2061: syntax error : identifier 'ISession_Curve'
1>d:\c++ programming\mfc\ascent\ascent\geomsources.cpp(167) : error C2065: 'aGraphicCurve' : undeclared identifier
1>d:\c++ programming\mfc\ascent\ascent\geomsources.cpp(168) : error C2065: 'aGraphicCurve' : undeclared identifier
1>d:\c++ programming\mfc\ascent\ascent\geomsources.cpp(168) : error C2227: left of '->Attributes' must point to class/struct/union/generic type
1> type is ''unknown-type''
1>d:\c++ programming\mfc\ascent\ascent\geomsources.cpp(168) : error C2227: left of '->LineAspect' must point to class/struct/union/generic type
1>d:\c++ programming\mfc\ascent\ascent\geomsources.cpp(168) : error C2227: left of '->SetColor' must point to class/struct/union/generic type
1>d:\c++ programming\mfc\ascent\ascent\geomsources.cpp(169) : error C2065: 'aGraphicCurve' : undeclared identifier
1>d:\c++ programming\mfc\ascent\ascent\geomsources.cpp(176) : error C2065: 'Handle_ISession_Curve' : undeclared identifier
1>d:\c++ programming\mfc\ascent\ascent\geomsources.cpp(176) : error C2146: syntax error : missing ';' before identifier 'aGraphicCurve'
1>d:\c++ programming\mfc\ascent\ascent\geomsources.cpp(176) : error C2065: 'aGraphicCurve' : undeclared identifier
1>d:\c++ programming\mfc\ascent\ascent\geomsources.cpp(176) : error C2061: syntax error : identifier 'ISession_Curve'
1>d:\c++ programming\mfc\ascent\ascent\geomsources.cpp(177) : error C2065: 'aGraphicCurve' : undeclared identifier
1>d:\c++ programming\mfc\ascent\ascent\geomsources.cpp(188) : error C2065: 'Handle_ISession_Surface' : undeclared identifier
1>d:\c++ programming\mfc\ascent\ascent\geomsources.cpp(188) : error C2146: syntax error : missing ';' before identifier 'aGraphicalSurface'
1>d:\c++ programming\mfc\ascent\ascent\geomsources.cpp(188) : error C2065: 'aGraphicalSurface' : undeclared identifier
1>d:\c++ programming\mfc\ascent\ascent\geomsources.cpp(188) : error C2061: syntax error : identifier 'ISession_Surface'
1>d:\c++ programming\mfc\ascent\ascent\geomsources.cpp(189) : error C2065: 'aGraphicalSurface' : undeclared identifier
1>d:\c++ programming\mfc\ascent\ascent\geomsources.cpp(190) : error C2065: 'aGraphicalSurface' : undeclared identifier
1>d:\c++ programming\mfc\ascent\ascent\geomsources.cpp(190) : error C2227: left of '->Attributes' must point to class/struct/union/generic type
1> type is ''unknown-type''
1>d:\c++ programming\mfc\ascent\ascent\geomsources.cpp(190) : error C2227: left of '->FreeBoundaryAspect' must point to class/struct/union/generic type
1>d:\c++ programming\mfc\ascent\ascent\geomsources.cpp(190) : error C2227: left of '->SetColor' must point to class/struct/union/generic type
1>d:\c++ programming\mfc\ascent\ascent\geomsources.cpp(191) : error C2065: 'aGraphicalSurface' : undeclared identifier
1>d:\c++ programming\mfc\ascent\ascent\geomsources.cpp(191) : error C2227: left of '->Attributes' must point to class/struct/union/generic type
1> type is ''unknown-type''
1>d:\c++ programming\mfc\ascent\ascent\geomsources.cpp(191) : error C2227: left of '->UIsoAspect' must point to class/struct/union/generic type
1>d:\c++ programming\mfc\ascent\ascent\geomsources.cpp(191) : error C2227: left of '->SetColor' must point to class/struct/union/generic type
1>d:\c++ programming\mfc\ascent\ascent\geomsources.cpp(192) : error C2065: 'aGraphicalSurface' : undeclared identifier
1>d:\c++ programming\mfc\ascent\ascent\geomsources.cpp(192) : error C2227: left of '->Attributes' must point to class/struct/union/generic type
1> type is ''unknown-type''
1>d:\c++ programming\mfc\ascent\ascent\geomsources.cpp(192) : error C2227: left of '->VIsoAspect' must point to class/struct/union/generic type
1>d:\c++ programming\mfc\ascent\ascent\geomsources.cpp(192) : error C2227: left of '->SetColor' must point to class/struct/union/generic type
1>d:\c++ programming\mfc\ascent\ascent\geomsources.cpp(193) : error C2065: 'aGraphicalSurface' : undeclared identifier
1>d:\c++ programming\mfc\ascent\ascent\geomsources.cpp(200) : error C2065: 'Handle_ISession_Surface' : undeclared identifier
1>d:\c++ programming\mfc\ascent\ascent\geomsources.cpp(200) : error C2146: syntax error : missing ';' before identifier 'aGraphicalSurface'
1>d:\c++ programming\mfc\ascent\ascent\geomsources.cpp(200) : error C2065: 'aGraphicalSurface' : undeclared identifier
1>d:\c++ programming\mfc\ascent\ascent\geomsources.cpp(200) : error C2061: syntax error : identifier 'ISession_Surface'
1>d:\c++ programming\mfc\ascent\ascent\geomsources.cpp(201) : error C2065: 'aGraphicalSurface' : undeclared identifier

my procedure is

first, i make a mfc programe which is no error. and i try to keep the sample of OCC geometry.

so i copy the source and header in my program. of cource, The name and Ancestor change.

next i have problem. please help me

heXus's picture

Perhaps, you haven't included necessary "*.hxx" files.

shudolf's picture

thanks alot. i solve the problem as your assistant. Include the header file, there are no error in my code. but another problem has. you know the example of geometry has served by OCC, App class is inheritance class of OCC_3dApp. but i'm not. I want to link the Graphic device, so I copy the code in the OCC_3dApp headerfile.

public:
Handle_Graphic3d_WNTGraphicDevice GetGraphicDevice() const { return myGraphicDevice; } ;

protected:
Handle_Graphic3d_WNTGraphicDevice myGraphicDevice;

As a Result, i don't find error in my code. I'm sure that it's good!!

But, Next step i have a error.

d:\c++ programming\mfc\ascent\ascent\ascentdoc.cpp(59) : error C2661: 'Standard_Transient::operator new' : no overloaded function takes 3 arguments
1>d:\c++ programming\mfc\ascent\ascent\ascentdoc.cpp(63) : error C2661: 'Standard_Transient::operator new' : no overloaded function takes 3 arguments

CASCENTDoc class generator is same to CGeometryDoc generator. of course, any method in Geometry example was copied.

why this problem has? have a nice day

shudolf's picture

i solve this problem

shudolf's picture