[vtkusers] QVTKWidget in QTCreator - runtime error in Debug

Michael Lynch mick.lynch at gmail.com
Mon Sep 14 16:09:56 EDT 2009


Thanks Clinton,
This solved my problem. Just for posterity, to solve the problem I set
CMAKE_BUILD_TYPE to Debug. Then I configured, generated, 'mingw32-make'd and
'mingw32-make install'd.

This created a set of debug dlls which work wonderfully with QTCreator and
qmake. I kept the old 'Release' dlls and use the flags
win32:release:LIBS += ....
win32:debug:LIBS += ....


Thanks again,
Michael

On Mon, Sep 14, 2009 at 11:15 AM, Clinton Stimpson <clinton at elemtech.com>wrote:

>
> If you didn't already, you'll need VTK in debug mode to use with debug Qt
> apps.
>
> Clint
>
> On Monday 14 September 2009 08:40:58 am Michael Lynch wrote:
> > Dear all,
> > I am having some trouble with some minimal "Hello World" code for
> > running qvtkwidget in debug (it works fine in release). My set up is vtk
> > (5.4.2) and qt (4.5.2) on Win XP. My IDE is qtcreator (1.2.1) and I am
> > using qmake. My VTK installation seems to be correct and I can run pure
> vtk
> > code in my ide with no problems.
> >
> > The minimal code I created compiles successfully and my LIBS and
> > INCLUDEPATH seem to be correct. However, at runtime in debug mode I get
> an
> > error which occurs at;
> > widget = new QVTKWidget;
> >
> > In release mode, the code both *compiles* and *runs* successfully.
> >
> > VTK dlls are specified in %PATH% and I have run dependency walker on the
> > compiled exe and it finds all dlls.
> >
> > However, I have noticed that QVTK.dll uses QTCORE4.dll and QTGUI4.dll and
> I
> > have a feeling that this might conflict with QTCORE4D.dll and
> QTGUI4D.dll?
> > Is this potentially the source of the error? And if so, how can I correct
> > it?
> >
> > I have seen similar problems here [
> > http://www.vtk.org/pipermail/vtkusers/2009-March/099876.html] and a
> > proposed solution in VS here [
> > http://www.vtk.org/pipermail/vtk-developers/2008-August/005437.html] and
> > further reading here [
> > http://www.vtk.org/pipermail/vtk-developers/2008-August/005427.html].
> >
> > However, I'm not sure how the solutions allow me to run in Debug mode in
> > QTCreator. Any help would be greatly appreciated.
> >
> > Thanks in advance,
>
>


-- 
Michael
-------------- next part --------------
An HTML attachment was scrubbed...
URL: <http://www.vtk.org/pipermail/vtkusers/attachments/20090914/bd841e3b/attachment.htm>


More information about the vtkusers mailing list