Visual Studio 2005 and OCC ?


does anyone got it work, VS 2005 and OCC, i tried but got some errors?

thanx in advance,

Orhun Birsoy's picture

I got it to work. But it's been a while since a build it from scratch, so if you list the erros you got, I can help you to solve them.

bhimesh's picture

hi Orhun..
have u build OpenCASCADE 6.1.0 in Visual Studio 2005...
if yes i would also like to know how...
what settings are required...

if possible can u please mail a sample code..

thanks in advance..

P Dolbey's picture

There's an issue with the loop way variables are scoped differently in 2005 by default. However if you add the line

ForceConformanceInForLoopScope="false" into the file

into C:\Program Files\Microsoft Visual Studio 8\VC\VCProjectDefaults\UpgradeFromVC71.vsprops

so that it reads

<?xml version="1.0"?>

then the upgraded VS2003 projects should compile without change.


P Dolbey's picture

Sorry the non-breaking spaces " "- they're an artifact created by the forum software.


Jonathan Hill's picture

I managed to get it to build in VS 2005, if I can be of any help.


DavidB's picture


i installed VS 2005, parallel to VS 2003, i hope they do not get in conflict. Now my question is, i want to use all the samples from OCC as MFC-applications not .NET-apps, when i bind all necessary folders like i did in VS2003, and start and compile the mfcexample to get the recompiled mfclib, i get some errors... i get always the same errors, when i compile samples from OCC...

>>WINVER not defined. Defaulting to 0x0502 (Windows Server 2003)<<< (is that right, i use Windows XP Pro, do i have to change it?)

>>d:\opencascade5.2\ros\inc\interfacegraphic_wnt.hxx(56) : error C4430: missing Typspezifizierer - int supposed...

>>d:\opencascade5.2\ros\inc\graphic2d_primitive.hxx(140) : error C2248: "Graphic2d_Buffer::Draw": No access to private Member

can you help me?

thanks in advance

P Dolbey's picture

I note that your errors show opencascade5.2 rather than 6.1 - this was compiled by default under Visual C++ 6.0 rather then VS2003.