Isssues realted with VC++ 8

I am unable to rebuild the open cascade workspace that is "Visualization" with Visual Studio 2005 ( VC++ 8.0).
Any one who can help me in this regrad.
Thanks in advance.
Rajesh

Orhun Birsoy's picture

What are the errors you are getting?

Stephane Routelous's picture

iirc, all the errors are related to for loop scope

for ( int i = 0 ; i < 10 ; i++ )
{
}

int a = i ; //error

move the int i declaration outside the for.

replace by
int i;
for ( i = 0 ; i < 10 ; i++ )
{
}

HTH,

Stephane

Orhun Birsoy's picture

If this is the error you are getting, instead of changing the source code, you can change the "Force Conformance in For Loop Scope" Option to "No". It is under Project Properties, C/C++, Language.

P Dolbey's picture

I've already sent this solution to Rajesh privately over email, but others may find this useful. There's a lot of project files to edit if you want to migrate to VS2005, but there is a quick fix. I may have posted this before and some of the indenting may get lost in this post but here goes.

Edit the file "UpgradeFromVC71.vsprops" in "C:\Program Files\Microsoft
Visual Studio 8\VC\VCProjectDefaults" to set the default template for VC
7.1 migrated apps. It's the ForceConformanceInForLoopScope="false" line that
fixes this problem. This template is inherenetly applied to all the
updated
project files in OCC.

<?xml version="1.0"?>

The _CRT_SECURE_NO_DEPRECATE settings also removes a load of warnings.

I think the only remaining issues are a number of "static" declations
that need fixing.

e.g. static

that need to be changed to

static int

These will pop out as error during the build.

Pete