OCC with Visual Studio .NET 2003

I have not been able to compile applications that use Open Cascade with the latest Microsoft compiler because they have finally removed support for the older, non-standard versions of the ostream, strstream, and fstream classes. The compiler complains when Open Cascade tries to #include and other obsolete header files.

Does anyone have any solution in mind? Is there a plan to release a version of Open Cascade that uses these classes more modern std:: variants? The Open Cascade code could probably be mostly fixed with a sed script (replace with , ostream with std::ostream, strstream with std::stringstream, etc.), but then I would have to recompile all of Open Cascade...

Thanks for any ideas.

Liu Ailin's picture

Hi,

I met the same problem.

c-poelman's picture

Hi Liu,

I finally fixed the problem by writing a little ImproveCascade program to modify the Open Cascade source code to support the new std:: namespace. Now it should work under MSVC .NET 2003, but you have to get the Open Cascade source code, run ImproveCascade on the source code, and then recompile Open Cascade from scratch.

I made a little project for it at http://www.opencascade.org/forumorg/project.php?project_id=127&f=8 or you can just grab the ImproveCascade.cpp file directly from http://www.stellarscience.com/improve_open_cascade.html.

Good luck!

-- Conrad

fhchina's picture

Hi, Conrad:

How to get the lastest source of OCC? I have tried with WinCVS, but I am not very familar with it. Can you give us a detailed instruction? The information on www.opencascade.org is too simple to be useful for CVS newbie such as me.

Thanks ahead.

-- fhchina

Conrad J Poelman's picture

Hi fhchina,

I downloaded the source code a long time ago. I didn't use CVS, I believe I went to the http://www.opencascade.org/devversion/ page and downladed the ZIP file. After extracting the ZIP file, I loaded the adm/WindowsNT/OCC.dsw workspace into Microsoft Visual Studio and compiled Open Cascade. It takes a long, long time to compile.

I hope this helps, good luck!

-- Conrad

Patrik Mueller's picture

Hi fhchina,

take a look at TortoiseCVS (http://tortoisecvs.sourceforge.net). I personally like it more than WinCVS.

HTH,

Patrik