PLZ Help

Hi every body,
I am a OCC beginner, and i am trying to add a form on
one of the OCC's sample. I see the same sample that does it, but I can't.
I add a form, define its ID and make some necessary changes but
undefined identifier error break every thing!
Could you please help me?

Patrik Mueller's picture

Hi,

could you write the errors to the forum?

Greets,

Patrik

Susan's picture

Hi Mr.Müller,
Thank you.
I add a dialog on one of those project(AisDisplayMode),and then use class wisard.
Now when I want to compile it the following error occures:

C:\OpenCASCADE5.1\samples\standard\mfc\05_AISDisplayMode\res\mydlg.cpp(5) : fatal error C1083: Cannot open include file: 'aisdisplaymode.h': No such file or directory

Patrik Mueller's picture

Hi Susan,

have you added the OCC includes and libs paths to VC or to your project?

Greets,

Patrik

Susan's picture

Hi Patrik,
yes of course I do, I change "aisdisplaymode.h" to "aisdisplaymodeapp.h" this solves my problem in aisdisplaymode sample, but in "TopologyBuilding" sample it doesn't work!
Now the error is:
c:\opencascade5.1\samples\standard\mfc\02_topologysamples\02_3_topologybuilding\res\mydlg.h(21) : error C2065: 'IDD_DIALOG1' : undeclared identifier
c:\opencascade5.1\samples\standard\mfc\02_topologysamples\02_3_topologybuilding\res\mydlg.h(21) : error C2057: expected constant expression

Patrik Mueller's picture

Hi Susan,

check your projects ressources if they include "IDD_DIALOG1". It seems you have more problems with VC than with OCC?

Regards,

Patrik

Susan's picture

Hi Patrik,
Thank you very much,
I add resource.h and just the following code has error:
mydlg dlg(NULL);
if (dlg.DoModal() == IDOK) { /*...*/}

The error is:
opologyBuildingDoc.obj : error LNK2001: unresolved external symbol "public: virtual int __thiscall mydlg::DoModal(void)" (?DoModal@mydlg@@UAEHXZ)
TopologyBuildingDoc.obj : error LNK2001: unresolved external symbol "public: __thiscall mydlg::mydlg(class CWnd *)" (??0mydlg@@QAE@PAVCWnd@@@Z)
../../Debug/TopologyBuilding.exe : fatal error LNK1120: 2 unresolved externals
Error executing link.exe.

Do you have any idea.
Regards,
Susan

Patrik Mueller's picture

Hi Susan,

sorry - but without seeing the whole code - it isn't so easy.

Greets,

Patrik

Susan's picture

Hi Patrik,
Thank you very much anyway.
I try to fix it.
With best wishes for you.Susan