<!DOCTYPE HTML PUBLIC "-//W3C//DTD HTML 4.01 Transitional//EN">
<html>
<head>
<meta content="text/html; charset=ISO-8859-1"
http-equiv="Content-Type">
<title></title>
</head>
<body bgcolor="#ffffff" text="#000000">
Hi, <br>
<br>
I did build it with <span
style="font-size: 11pt; font-family: "Calibri","sans-serif"; color: rgb(31, 73, 125);"
lang="EN-US">BUILD_SHARED_LIBS on. However if I turn this off and
solve my problem, what exactly have I turned off? i.e. what is the
purpose of </span><span
style="font-size: 11pt; font-family: "Calibri","sans-serif"; color: rgb(31, 73, 125);"
lang="EN-US">BUILD_SHARED_LIBS anyone??</span><br>
<br>
On 2.8.2010 17:19, Rocco Gasteiger wrote:
<blockquote cite="mid:002101cb324d$c5fb4340$51f1c9c0$@de" type="cite">
<meta http-equiv="Content-Type"
content="text/html; charset=ISO-8859-1">
<meta name="Generator" content="Microsoft Word 12 (filtered medium)">
<style>
<!--
/* Font Definitions */
@font-face
        {font-family:Wingdings;
        panose-1:5 0 0 0 0 0 0 0 0 0;}
@font-face
        {font-family:Wingdings;
        panose-1:5 0 0 0 0 0 0 0 0 0;}
@font-face
        {font-family:Calibri;
        panose-1:2 15 5 2 2 2 4 3 2 4;}
@font-face
        {font-family:Tahoma;
        panose-1:2 11 6 4 3 5 4 4 2 4;}
/* Style Definitions */
p.MsoNormal, li.MsoNormal, div.MsoNormal
        {margin:0cm;
        margin-bottom:.0001pt;
        font-size:12.0pt;
        font-family:"Times New Roman","serif";
        color:black;}
a:link, span.MsoHyperlink
        {mso-style-priority:99;
        color:blue;
        text-decoration:underline;}
a:visited, span.MsoHyperlinkFollowed
        {mso-style-priority:99;
        color:purple;
        text-decoration:underline;}
span.E-MailFormatvorlage17
        {mso-style-type:personal-reply;
        font-family:"Calibri","sans-serif";
        color:#1F497D;}
.MsoChpDefault
        {mso-style-type:export-only;
        font-size:10.0pt;}
@page WordSection1
        {size:612.0pt 792.0pt;
        margin:70.85pt 70.85pt 2.0cm 70.85pt;}
div.WordSection1
        {page:WordSection1;}
-->
</style>
<!--[if gte mso 9]><xml>
<o:shapedefaults v:ext="edit" spidmax="1026" />
</xml><![endif]--><!--[if gte mso 9]><xml>
<o:shapelayout v:ext="edit">
<o:idmap v:ext="edit" data="1" />
</o:shapelayout></xml><![endif]-->
<div class="WordSection1">
<p class="MsoNormal"><span
style="font-size: 11pt; font-family: "Calibri","sans-serif"; color: rgb(31, 73, 125);"
lang="EN-US">Hello Alex,<o:p></o:p></span></p>
<p class="MsoNormal"><span
style="font-size: 11pt; font-family: "Calibri","sans-serif"; color: rgb(31, 73, 125);"
lang="EN-US"><o:p> </o:p></span></p>
<p class="MsoNormal"><span
style="font-size: 11pt; font-family: "Calibri","sans-serif"; color: rgb(31, 73, 125);"
lang="EN-US">Did you build your VTK with shared libs
(BUILD_SHARED_LIBS) on?
I had the same problems like you and could only run my vtk-qt-program
in debug
or release mode. If I want to switch between modes, I had to recompile
VTK in
the according mode with an additional install run e.g. To run my
program in
release mode </span><span
style="font-size: 11pt; font-family: Wingdings; color: rgb(31, 73, 125);"
lang="EN-US">è</span><span
style="font-size: 11pt; font-family: "Calibri","sans-serif"; color: rgb(31, 73, 125);"
lang="EN-US"> compilation in Release and run install; To
run in debug mode </span><span
style="font-size: 11pt; font-family: Wingdings; color: rgb(31, 73, 125);"
lang="EN-US">è</span><span
style="font-size: 11pt; font-family: "Calibri","sans-serif"; color: rgb(31, 73, 125);"
lang="EN-US"> compilation in Debug and run
install. I resolved it by turn off the shared libs option in CMake (a
finally
rebuilding of VTK is necessary).<o:p></o:p></span></p>
<p class="MsoNormal"><span
style="font-size: 11pt; font-family: "Calibri","sans-serif"; color: rgb(31, 73, 125);"
lang="EN-US"><o:p> </o:p></span></p>
<p class="MsoNormal"><span
style="font-size: 11pt; font-family: "Calibri","sans-serif"; color: rgb(31, 73, 125);"
lang="EN-US">Hope that helps,<o:p></o:p></span></p>
<p class="MsoNormal"><span
style="font-size: 11pt; font-family: "Calibri","sans-serif"; color: rgb(31, 73, 125);"
lang="EN-US">Best regards, Rocco<o:p></o:p></span></p>
<p class="MsoNormal"><span
style="font-size: 11pt; font-family: "Calibri","sans-serif"; color: rgb(31, 73, 125);"
lang="EN-US"><o:p> </o:p></span></p>
<div>
<div
style="border-style: solid none none; border-color: rgb(181, 196, 223) -moz-use-text-color -moz-use-text-color; border-width: 1pt medium medium; padding: 3pt 0cm 0cm;">
<p class="MsoNormal"><b><span
style="font-size: 10pt; font-family: "Tahoma","sans-serif"; color: windowtext;">Von:</span></b><span
style="font-size: 10pt; font-family: "Tahoma","sans-serif"; color: windowtext;">
<a class="moz-txt-link-abbreviated" href="mailto:vtkusers-bounces@vtk.org">vtkusers-bounces@vtk.org</a>
[<a class="moz-txt-link-freetext" href="mailto:vtkusers-bounces@vtk.org">mailto:vtkusers-bounces@vtk.org</a>] <b>Im Auftrag von </b>Alex Southern<br>
<b>Gesendet:</b> Montag, 2. August 2010 15:59<br>
<b>An:</b> <a class="moz-txt-link-abbreviated" href="mailto:vtkusers@vtk.org">vtkusers@vtk.org</a><br>
<b>Betreff:</b> Re: [vtkusers] VTK and QT Projects (QVTKWidget.h)<o:p></o:p></span></p>
</div>
</div>
<p class="MsoNormal"><o:p> </o:p></p>
<p class="MsoNormal">I solved my problem.... almost,<br>
<br>
basically despite having a working application in VS 2008, I decided to
use my
source files to build a new one using cmake. For future reference the
file is
below, although a word of warning.....<br>
<br>
I included the WIN32 option (in ADD_EXECUTABLE) in order to stop the
console
window appearing in addition to my gui. Upon compilation this caused 2
linker
errors, I stopped both of these by adding qtmain.lib to the linker's
additional
dependencies. This solved the problem BUT I'm sure that Cmake should be
doing
this for me, so the cmakelists file is probably missing something.<br>
<br>
Secondly, The project only runs in Release Mode !!, I did some digging
and this
has something to do with QT dll conflicts. The output window shows that
it is
loading both the release and debug versions of Qtcore4.dll Qtgui4.dll
(Qtcored4.dll Qtguid4.dll) as of yet I dont know how stop this....<br>
<br>
Any ideas?<br>
<br>
Cmake file below<br>
---------------------------------------<br>
cmake_minimum_required(VERSION 2.8)<br>
<br>
PROJECT(WaveModellerVTK)<br>
<br>
FIND_PACKAGE(VTK)<br>
INCLUDE(${VTK_USE_FILE}) # include UseVTK.cmake<br>
<br>
FIND_PACKAGE(Qt4 REQUIRED)<br>
INCLUDE(${QT_USE_FILE}) # include UseQt4.cmake<br>
<br>
# support for out-of-source build<br>
INCLUDE_DIRECTORIES(<br>
${CMAKE_CURRENT_BINARY_DIR}<br>
${CMAKE_CURRENT_SOURCE_DIR}<br>
)<br>
<br>
# Set your files and resources here<br>
SET(WMSrcs main.cpp wavemodeller.cpp nodfile.cpp newproject.cpp)<br>
SET(WMUI wavemodeller.ui newproject.ui)<br>
SET(WMqrc wavemodellericons.qrc)<br>
SET(WMHeaders wavemodeller.h nodFile.h newproject.h)<br>
<br>
QT4_WRAP_UI(UISrcs ${WMUI})<br>
QT4_ADD_RESOURCES(UIico ${WMqrc})<br>
QT4_WRAP_CPP(MOCSrcs ${WMHeaders} )<br>
<br>
<br>
SOURCE_GROUP("Resources" FILES<br>
${WMUI}<br>
<br>
)<br>
<br>
SOURCE_GROUP("Generated" FILES<br>
${UISrcs}<br>
${MOCSrcs}<br>
# ${RCS_SOURCES}<br>
)<br>
<br>
ADD_EXECUTABLE( WaveModellerVTK WIN32 ${WMSrcs} ${UIico} ${WMUI}
${MOCSrcs})<br>
TARGET_LINK_LIBRARIES( WaveModellerVTK QVTK )<br>
<br>
-------------------------------------------------------------<br>
<br>
On 30.7.2010 23:08, Darshan Pai wrote: <o:p></o:p></p>
<p class="MsoNormal" style="margin-bottom: 12pt;">Hi Alex,<br>
<br>
you should probably include the QVTKWidget.h that is present in your
bin folder
rather than the source folder . The reason is that when you compile VTK
with
GUISupport it generates a moc file for the widget which is saved in the
bin
folder and will be needed for QT .<br>
<br>
Regards<br>
Darshan<o:p></o:p></p>
<div>
<p class="MsoNormal">On Fri, Jul 30, 2010 at 12:19 PM, Alex Southern
<<a moz-do-not-send="true" href="mailto:mrapsouthern@gmail.com">mrapsouthern@gmail.com</a>>
wrote:<o:p></o:p></p>
<div>
<p class="MsoNormal">Hi,<br>
<br>
QT has been working fine up until I try to compile a gui with a
vtkwidgetplugin
in. However just in case it does matter, yes I beleive I did.<br>
<br>
In Project->Properties->C/C++->Additional Include
Directories...<br>
".\GeneratedFiles;"$(QTDIR)\include";".\GeneratedFiles\$(ConfigurationName)";"$(QTDIR)\include\qtmain";"$(QTDIR)\include\QtCore";"$(QTDIR)\include\QtGui";.\<br>
<br>
In Project->Properties->Linker->Additional Library
Directories...<br>
"$(QTDIR)\lib"<br>
<br>
QTDIR has been set in the Environment Variables in My
Computer->Properties->Advanced etc<br>
<br>
In Project->Properties->Linker->Additional Dependencies...<br>
qtmaind.lib QtCored4.lib QtGuid4.lib $(NOINHERIT)<br>
<br>
Although like I said the QT stuff works fine, If I remove the VTKwidget
and try
to compile the app it works perfectly.<br>
<br>
Cheers<br>
Alex<br>
<br>
<br>
On 30.7.2010 19:08, Bobby Ren wrote: <o:p></o:p></p>
<p class="MsoNormal">did you add the qt include directory into your
additional
includes folders list under the project settings? <o:p></o:p></p>
<div>
<div>
<p class="MsoNormal" style="margin-bottom: 12pt;"><o:p> </o:p></p>
<div>
<p class="MsoNormal">On Fri, Jul 30, 2010 at 11:59 AM, Alex Southern
<<a moz-do-not-send="true" href="mailto:mrapsouthern@gmail.com"
target="_blank">mrapsouthern@gmail.com</a>>
wrote:<o:p></o:p></p>
<p class="MsoNormal">Hi,<br>
<br>
(Not sure if I should post this here, but I think its a VTK thing
rather than
QT)<br>
<br>
I'm sure this must be straight forward....<br>
<br>
I have been using QT to make a project in VS 2008 Pro, Windows 7. All
going
well and then I want to add in the VTK rendering window....<br>
<br>
Note: Yes, I installed QT first and waited a couple of hours for it to
build from source, then I installed VTK using cmake with the required,
VTK_USE_QT and VTK_GUISUPPORT, everything eventually installed fine,
cmake found
the QT installation no problem and then QT demos in VTK examples work
fine.<br>
<br>
I copy the QVTKwidgetplugin.dll compiled by VTK over to the
C:/QT/4.6.3/plugins/designer folder. The vtk widget shows up in the
widgets box
in QT designer when running through Visual Studio and standalone.<br>
<br>
I then return to my QT project, open QT designer and add the vtkwidget
to my
desired Tab. Save All. Exit QT Designer.<br>
<br>
Then I try to compile the project and I am presented with "Cannot
open include file: 'QVTKWidget.h': No such file or directory".<br>
<br>
Note: I should add that my VTK installation is fine, my VTK projects
still
compile an run no problem.<br>
<br>
The file exists in the VTK build folder C:\VTK\include\vtk-5.6<br>
<br>
So Im sure this has something to do with the fact the project was never
setup
for VTK usage and I need to include the path somehow. Although I have
had no
luck so far.<br>
<br>
Any suggestions please???<br>
<br>
Thanks<br>
Alex<br>
<br>
<br>
_______________________________________________<br>
Powered by <a moz-do-not-send="true" href="http://www.kitware.com"
target="_blank">www.kitware.com</a><br>
<br>
Visit other Kitware open-source projects at <a moz-do-not-send="true"
href="http://www.kitware.com/opensource/opensource.html"
target="_blank">http://www.kitware.com/opensource/opensource.html</a><br>
<br>
Please keep messages on-topic and check the VTK FAQ at: <a
moz-do-not-send="true" href="http://www.vtk.org/Wiki/VTK_FAQ"
target="_blank">http://www.vtk.org/Wiki/VTK_FAQ</a><br>
<br>
Follow this link to subscribe/unsubscribe:<br>
<a moz-do-not-send="true"
href="http://www.vtk.org/mailman/listinfo/vtkusers" target="_blank">http://www.vtk.org/mailman/listinfo/vtkusers</a><o:p></o:p></p>
</div>
<p class="MsoNormal"><o:p> </o:p></p>
</div>
</div>
<p class="MsoNormal"><o:p> </o:p></p>
</div>
<p class="MsoNormal" style="margin-bottom: 12pt;"><br>
_______________________________________________<br>
Powered by <a moz-do-not-send="true" href="http://www.kitware.com"
target="_blank">www.kitware.com</a><br>
<br>
Visit other Kitware open-source projects at <a moz-do-not-send="true"
href="http://www.kitware.com/opensource/opensource.html"
target="_blank">http://www.kitware.com/opensource/opensource.html</a><br>
<br>
Please keep messages on-topic and check the VTK FAQ at: <a
moz-do-not-send="true" href="http://www.vtk.org/Wiki/VTK_FAQ"
target="_blank">http://www.vtk.org/Wiki/VTK_FAQ</a><br>
<br>
Follow this link to subscribe/unsubscribe:<br>
<a moz-do-not-send="true"
href="http://www.vtk.org/mailman/listinfo/vtkusers" target="_blank">http://www.vtk.org/mailman/listinfo/vtkusers</a><o:p></o:p></p>
</div>
<p class="MsoNormal"><o:p> </o:p></p>
<p class="MsoNormal"><o:p> </o:p></p>
</div>
</blockquote>
<br>
</body>
</html>