For all issues regarding the Forums use, please, refer to the Forum Rules.

Our Solutions

Need professional assistance?
Consider our:

Support Offerings

 

Need to speed up your development?
Have a look at our:

Samples & Tools

 

Need some functionality extending standard OCCT capabilities?
Check out our:

Adv. Components

OCC Sources with QtCreator

Yuriy Sinithin's picture
Forums: 

It's cool working with OCC Sources under Qt Creator IDE. Also here we don't use any Qt library but qmake is generate the makefile for all platform Unix, Windows and Mac.

Here I'm create the project for OCC sources and it's working under Windows/linux. Mac is not tested

For using:
unpack the Qt.zip in adm directory of OCC and start playing !

QbProg's picture

nice :)

Yuriy Sinithin's picture

It's cool for me too. Now I'm see all sources and can create any change. I'm working for six day for create this project.

Yuriy Sinithin's picture

Updated for Linux distribution. Also some tests on Windows. If you are using previous project, clear Qt from adm directory and unpack this new

Yuriy Sinithin's picture

And that all, no anybody try this solution ???

Hugues Delorme's picture

Nice work !

Maybe you could clone git repos tpaviot/oce (https://github.com/tpaviot/oce) and commit your qmake project files there. I would be interested to contribute to your effort. The objective then would to submit your work as a pull request to OCE.

My first suggestion is to have a root common.pri of config.pri that catches stuff common to all qmake project files, like :

- Include path to OCC's inc/ folder
- OS-dependent config
- Common defines (like "DEFINES += _OCC64" for example)
- ...

ceyhan's picture

I can't find Qt.zip file. Can you explain me.
Thank You.

Yuriy Sinithin's picture

Qt

Attachments: 
ceyhan's picture

Thanks again JuryS.

Sharjith Naramparambath's picture

Sounds great!

Chanaka Mallikarachchi's picture

Hi, Is there any settings that has to be done with the QT creator before compiling OCC version 6.5.0. I've tried to compile the foundation module and it gives compile errors.( I've extracted the qt.tar.gz file in the adm folder)

Yuriy Sinithin's picture

Here is Qt project for OCC 6.5.1 but here more modification, more that 10000 headers is not using, only base classes:

Foundation
ModelingAlgorithms
ModelingData
Visualization
and some part of ApplicationFramework

Attachments: 
Chanaka Mallikarachchi's picture

Thanks. But I'm getting the following error when I'm trying to compile the OCC 6.5.1. This looks more like a settings problem.
/////
Could not find make command: mingw32-make.exe in the build environment
Error while building project Foundation (target: Desktop)
When executing build step 'Make'
/////
I have added %QTDIR%\bin to path variable and defined QTDIR as C:\Qt\2010.05\qt\.
I did not get this error when I tried to compile using QT6.5.0zip file & OCC 6.5.0. Then what I got was some compilation errors.

Chanaka Mallikarachchi's picture

I managed to get past the above problem. It was some settings. Please ignore the above. I'm getting the following compilation errors still (please refer the attached screenshot).
This is the same set I'm getting for 6.5.0 & 6.5.1 versions.

Attachments: 
Chanaka Mallikarachchi's picture

Okay. Managed get rid of most of the errors by including "limits.h" header file in the Standard_Integer.hxx file.
Now I'm down to the following errors only.

/////////////
'STATUS_FLOAT_MULTIPLE_TRAPS' was not declared in this scope
'STATUS_FLOAT_MULTIPLE_FAULTS' was not declared in this scope
unrecognized option '-Gd'
unrecognized option '-EHa'
//////////////
The first two errors came in ros\src\OSD\OSD_signal_WNT.cxx file.

Any help is appreciated.

Yuriy Sinithin's picture

Hi, It's no good idea to build OCC on windows with mingw.
Use only MS Visual Studio.
For me It's working cool with Microsoft Visual Studio 9.0, also you need to download and install the Qt librarys for windows :
http://qt.nokia.com/downloads/windows-cpp-vs2008
Don't use Qt librarys compiled with MinGW.

Also you don't need any options, only select release mode for build, no config.h needed under MS Visual Studio

Also It's a cool idea to build OCC project with MinGW. On last week I'm try to make this working too. It's like a some windows hack.........

Yuriy Sinithin's picture

And If you don't need OCC version for Linux, MacOS and another system, only for Windows you may use default .vcproj files with MS Visual Studio. But I think that Qt Creator IDE more userfull that MS Visual, but my reason that I'm build OCC librarys not only for windows and can't use cmake and other stuffs.

Chanaka Mallikarachchi's picture

HI Yuriy,
Sorry I do not quite understand. I am building my application in windows, but i want my application using OCC to be cross platform. That is why I want to use it in Qt. To do that I have to compile the libraries in QT Creator IDE correct?
From most of the messages I read, looks like this is possible. Just that I can't make it work. Please guide me how to do this. Thanks.

P Dolbey's picture

You don't have to compile OCC in QtCreator to develop cross platform applications. You can build your libs anyway you choose, automake, cmake or whatever - or just use one of the precompiled distros. Using QtCreator for building OCT is just a convenience but its not essential - its going to be your application source code that needs to be proven across platform and compilers.

Pete

Yuriy Sinithin's picture

In your previous messages you are write that you can't build your OCC project, because you are using the GCC compiler under Windows.
You can't build OCC librarys with GCC compiler under Windows, only under Linux. And that is reason that you need to use MS VisualStudio under windows.

You can catch this error messages under Linux too, if you don't have config.h.

I don't know how to help you with next, only I may mail to you my OCC sources if you are need, but here more modification

Yuriy Sinithin's picture

Now you are using mingw32-make.exe
But you are need nmake.exe

Do you try to build OCC librarys with *.VCPROJ files or not ?

Chanaka Mallikarachchi's picture

Hi Yuriy,
I am using *.pro files to build the OCC libraries with QT creator. I can't use *.VCProJ files in QT creator, can I?
How do I use nmake?

Thanks.

Chanaka.

Yuriy Sinithin's picture

Open ms page:
http://msdn.microsoft.com/en-us/express/future/bb421473

select Visual C ++ 2008 and install it.

then go to adm directory and open any *.vcproj.
If it can build than you can build the OCC project with Qt Creator too.

Yuriy Sinithin's picture

And if you are correctly install MS Visual C++ then you must install Qt precompiled with MS Visual Studio 2008.

And then you can use OCC *.pro files under Windows.
You must understand that qt *.pro files need only for generating makefile, they are don't used any Qt librarys. And after generating makefile.release, makefile.debug they are build with nmake, which a part of MS Visual C++

Sathiya nathan's picture

Unable to compile using Qt creator
I got the following error message.

Reading E:/Qt-OpenCaseCade/ros/adm/Qt/ApplicationFramework/DocBin/DocBin.pro [E:/Qt-OpenCaseCade/ros/adm/All-build-desktop-Qt_4_8_1_for_Desktop_-_MinGW__Qt_SDK__Debug/ApplicationFramework/DocBin]
Reading E:/Qt-OpenCaseCade/ros/adm/Qt/ApplicationFramework/DocXml/DocXml.pro [E:/Qt-OpenCaseCade/ros/adm/All-build-desktop-Qt_4_8_1_for_Desktop_-_MinGW__Qt_SDK__Debug/ApplicationFramework/DocXml]
WARNING: Failure to find: ../../../../src/BRepExtrema/BRepExtrema_SolutionElem.cxx
WARNING: Failure to find: ../../../../drv/BRepExtrema/BRepExtrema_SeqOfSolution_0.cxx
WARNING: Failure to find: ../../../../drv/BRepExtrema/BRepExtrema_SequenceNodeOfSeqOfSolution_0.cxx
WARNING: Failure to find: ../../../../src/BRepExtrema/BRepExtrema_SolutionElem.cxx
WARNING: Failure to find: ../../../../drv/BRepExtrema/BRepExtrema_SeqOfSolution_0.cxx

Yuriy Sinithin's picture

Continue...

Here is simple way to use jom.exe for fast build OCC librarys under windows. It's working more fastly, for me for three times.

download last version of jom ftp://ftp.qt.nokia.com/jom/, extract jom.exe into $(QTDIR)/bin
and then replase in project settings nmake with jom.exe j -n where n - number of your core and start playing !!!

yashika's picture

How can I include OCC library in Qt modules of Visual Studio 2005?? Like When I start with new Qt application in Visual Studio, there comes different modules like Qt library, openGl Library but i m not getting OCC library...
I have also registered the occ.dll but what to do after dat...How may I link the OCC library with my visual studio application...
Can I have the complete steps to start an app with open cascade in visual studio 2005...
Please anyone reply....

yashika's picture

How can I include OCC library in Qt modules of Visual Studio 2005?? Like When I start with new Qt application in Visual Studio, there comes different modules like Qt library, openGl Library but i m not getting OCC library...
I have also registered the occ.dll but what to do after dat...How may I link the OCC library with my visual studio application...
Can I have the complete steps to start an app with open cascade in visual studio 2005...
Please anyone reply....

Yuriy Sinithin's picture

What is occ.dll?
In the fact you may use vcproj files for compiling OCC libraries. I create this qt pro for my reason. And in this moment I have modernized this project for mingw x86 and x64 platforms. I don't remove MS Visual compatibility from *.pro files, but don't use ms compilers anywhere.

Start playing with VC project files at this moment.

Yuriy Sinithin's picture

At last time I'm remake all *.pro files to build with:
1. Lin_x86
2. Lin_x64
3. MingW_x86
4. MingW_x64
5. MS Visual_x86
6. MS Visual_x64

Also you are need to set some environments for the sample with .cmd file like this (build under windows with Mingw64):

set CURRENT_CPU=x64
set PATH=C:\Programming\mingw64\bin;%PATH%
set MAKE_COMMAND=mingw32-make -j%NUMBER_OF_PROCESSORS%
C:\Qt\qtcreator-1.2.1\bin\qtcreator.exe

Yuriy Sinithin's picture

But ! to build OCC librarys under mingw_w64 you are need make modification for all classes, because there we don't have some basic librarys methods like ~Destructor in some classes (virtual destructor realy don't working in some cases) also assign methods and rebuild all Exceptions classes and some modification calling _MINGW in Qt project files.

Building under MS Visual without any modifications.