How to implement OCC in VC++

Can anyone tell me how to implement OCC in VC++ SDI architecture or where to find a step by step tutorial on how to implement...

I need to know the default configuration of my VC++ to support working with OCC

Patrik Mueller's picture

Hi,

if you have installed OCC you have a samples directory ("\samples\standard\mfc"). These should give you an idea how to use OCC with VC (appart from setting the paths in VC).

HTH,

Patrik

lucian's picture

Yes i know that file I look into it and I saw the exemples but when i try to make my own project and to include some OCC include files *.hxx it give me errors like this...

--------------------Configuration: MyApp - Win32 Debug--------------------
Compiling...
StdAfx.cpp
c:\opencascade5.2\ros\inc\standard.hxx(94) : error C2061: syntax error : identifier 'ostream'
c:\opencascade5.2\ros\inc\standard.hxx(96) : error C2061: syntax error : identifier 'ostream'
c:\opencascade5.2\ros\inc\standard_real.hxx(315) : error C2065: 'asinh' : undeclared identifier
c:\opencascade5.2\ros\inc\standard_storable.hxx(76) : error C2061: syntax error : identifier 'ostream'
c:\opencascade5.2\ros\inc\standard_storable.hxx(121) : error C2061: syntax error : identifier 'ostream'
c:\opencascade5.2\ros\inc\standard_storable.hxx(122) : error C2065: 'S' : undeclared identifier
c:\opencascade5.2\ros\inc\standard_transient_proto.hxx(52) : error C2061: syntax error : identifier 'ostream'
c:\opencascade5.2\ros\inc\handle_standard_transient.hxx(92) : error C2061: syntax error : identifier 'ostream'
c:\opencascade5.2\ros\inc\handle_standard_transient.hxx(96) : error C2061: syntax error : identifier 'ostream'
c:\opencascade5.2\ros\inc\handle_standard_transient.hxx(203) : error C2061: syntax error : identifier 'ostream'
c:\opencascade5.2\ros\inc\tcollection_basicmap.hxx(68) : error C2061: syntax error : identifier 'ostream'
c:\opencascade5.2\ros\inc\mmgt_storagemanager.hxx(69) : error C2061: syntax error : identifier 'ostream'
c:\opencascade5.2\ros\inc\mmgt_storagemanager.lxx(28) : error C2065: 'ostream' : undeclared identifier
c:\opencascade5.2\ros\inc\mmgt_storagemanager.lxx(28) : error C2065: 's' : undeclared identifier
c:\opencascade5.2\ros\inc\mmgt_storagemanager.lxx(28) : error C2182: 'ShallowDump' : illegal use of type 'void'
c:\opencascade5.2\ros\inc\mmgt_storagemanager.lxx(28) : error C2433: 'ShallowDump' : 'inline' not permitted on data declarations
c:\opencascade5.2\ros\inc\mmgt_storagemanager.lxx(28) : error C2350: 'MMgt_StorageManager::ShallowDump' is not a static member..
.....and so on...

Patrik Mueller's picture

OK,

assume you have do the VC settings for the OCC include and lib paths, try to add "WNT" to you project settings!!!

Greets,

Patrik

lucian's picture

Do I need to recompile all the OCC dll's an lib files?

Patrik Mueller's picture

No....

lucian's picture

Thank you for help.

lucian's picture

Sorry to disturb you but I got this error..

c:\opencascade5.2\samples\standard\mfc\myapp\stdafx.h(25) : fatal error C1189: #error : WNT precompiler directive is mandatory for CasCade

How to include WNT

lucian's picture

Ohh I see... in the Preprocessor definitions...I need to add WNT