Fri, 12/14/2007 - 22:26
Forums:
Hi, I'm intersted in working with Open Cascade in the Qt environment. I'm new to both, and wondering if there are any code examples anywhere that might, for example, show how to use the Open Cascade graphics viewer (don't remember what the object is called offhand) within a QMainWindow? Probably pretty easy, but I'm terrible at integrating components from different sources....
Gerald
Sat, 12/15/2007 - 10:56
You can find the QtOPENCASCADE project at http://qtocc.sourceforge.net/. There's a sample Qt4 viewer harness you can download.
Pete
Tue, 12/18/2007 - 04:05
Pete
Thanks for the Sourceforge link - I look forward to following the development of this project.
As for getting the example running, I'm having a link problem. qmake seems to execute properly, but when I nmake, I get the following:
_____________________________________________
C:\rapidstest\QtOCCHarness-0.1>nmake
Microsoft (R) Program Maintenance Utility Version 8.00.50727.42
Copyright (C) Microsoft Corporation. All rights reserved.
"C:\Program Files\Microsoft Visual Studio 8\VC\BIN\nmake.exe" -f Makefile.Debug all
Microsoft (R) Program Maintenance Utility Version 8.00.50727.42
Copyright (C) Microsoft Corporation. All rights reserved.
link /LIBPATH:"c:\Qt\4.3.2\lib" /NOLOGO /DEBUG /SUBSYSTEM:WINDOWS /MANIFESTFILE:"debug\QtOCCHarness.intermediate
.manifest" /OUT:debug\QtOCCHarness.exe @C:\DOCUME~1\GANDER~1\LOCALS~1\Temp\nmAC.tmp
LINK : fatal error LNK1104: cannot open file 'C:\OpenCASCADE6.2.0\ros/win32/libd/BinLPlugin.lib'
NMAKE : fatal error U1077: '"C:\Program Files\Microsoft Visual Studio 8\VC\BIN\link.EXE"' : return code '0x450'
Stop.
NMAKE : fatal error U1077: '"C:\Program Files\Microsoft Visual Studio 8\VC\BIN\nmake.exe"' : return code '0x2'
Stop.
C:\rapidstest\QtOCCHarness-0.1>
____________________________________________
It's complaining about the "libd" folder - I don't know if it's supposed to be copied from the ros/lib folder. Am I perhaps missing a command line option? I'm trying to work my way through the script files, but I'm not good at that either... Sorry to bother you with this trivial stuff. If you know offhand what the problem might be, I'd love to hear.
Gerald
Tue, 12/18/2007 - 13:08
Gerald,
Sorry, the opencascade.pri file assumes that you have compiled a debug version of the Open Cascade libaries into the libd/bind folders. Perhaps by default, we should target developers who haven't done this
There's 3 ways you can fix this problem.
1. Compile your own debug version of OCC (but this is time consuming)
2. Edit the opencascade.pri to change libd -> lib and regenerate makefiles with qmake. (p.s. I normally use "qmake -tp vc" to generate VS2005 vcproj files).
3. Copy the contents of the lib folder to a libd folder - this is like a place holder for when you actually compile a set of debug libs.
The project has been working with the qmake pro files as well as the C++ source. There are some developers who have started suffixing "d" to the debug libs as well and we have been trying to accomodate this with some parameter changes in the make files. Theres a few experimental "toys" that have been developed on http://qtocc.sourceforge.net/data - you'll need to read the developers forum on sourceforge to see whats being looked at.
Cheers
Pete