opencascade and visualstudio

does opencascade browser support visual studio9.0?if yes how do we include or link it to vc++?
please reply if u know.

Svetlozar Kostadinov's picture

I am using the OCC 6.3 browser in VS 9.0. There's no source code for it. You must link to the lib file. It is easy, but the browser crashes very often, don't know why. All you need to do is to include tools\ocafbrowser\inc\DebugBrowser.hxx in your CPP. Then you have to add tools\ocafbrowser\win32\qt\lib\DFBrowser.lib to the linker settings in project properties. Then copy DFBrowser.dll, 3rdparty\win32\qt\QtCore4.dll and 3rdparty\win32\qt\QtGUI4.dll to the project's Debug/Release directory and that's it.

Divya's picture

Hi,
thank you very much.we could run the program finally.can we get your e-mail id or something so that we can ask you when we have doubts.coz this forum takes a lot of time.Thank you

Divya's picture

while debug,

.dll files say symbols not loaded in the ,mdule window!how do I load them?

Svetlozar Kostadinov's picture

Here is my e-mail: svr < at > start.bg. About debug symbols... You mean debug symbols of OCC not DFBrowser.dll? Cause DFBrowser.dll is distributed without source code or debug version. So if you want to use debug version of OCC, you need to build it by yourself, because the DLLs in the distribution are only release versions. The SLN files for all major OCC modules are in ros\adm directory. So then you have to:
1. Rebuild in debug all OCC DLLs you need. They are located in the following order: FoundationClasses.sln, ModelingData.sln, ModelingAlgorithms.sln, Visualiztion.sln, ApplicationFramework.sln, etc. The compilation of all DLLs takes at least 1 hour on a modern 2 GHz computer.
2. Go to Visual Studio menu Tools :: Options :: "Projects & Solutions" section :: VC++ directories and the library path $(CASROOT)\win32\libd
3. Go to Windows System Properties with right click on My Computer :: Properties (or pressing +, then click on "Advanced" tab :: "Environment variables", then change (or eventually add) the OCC debug DLLs directory to your PATH. For example: PATH = C:\OCAS63\ROS\WIN32\LIBD. This is the directory where Windows will search for a DLL if it's missing in the EXE's directory.
4. Probably you will have to restart Visual Studion for the enviroment variables to refresh.
5. [Optional] You can delete the intermediate files in \ros\win32\objd directory to save disk space.
6. Good luck finding your bug :)

Venugopal Gudimetla's picture

Hi Divya, is it also possible to have your email id pl? I am new to OpenCascade and I was wondering if I can take your help if I am stuck to get started?
Thanks,
Venu

Stephen Leary's picture

Divya,

This may not be what you are looking for but there is a c# wrapper for opencascade which works perfectly in visual studio.

http://www.opencascade.org/org/community/projects/?project_id=218

I have OpenCascade working with the C++ in VS2008 (9.0?) but i have had to edit library paths and so forth and the Intellisense is not very reliable. I dont know whether thats because of my setup, vs2008 or opencascade.