[vtk-developers] Fwd: VTK and QT5 Errors in Windows

Andrew Maclean andrew.amaclean at gmail.com
Mon Jun 10 19:53:35 EDT 2013


Sorry, forgot to include vtk-developers.

---------- Forwarded message ----------
From: Andrew Maclean <andrew.amaclean at gmail.com>
Date: Mon, Jun 10, 2013 at 10:48 AM
Subject: Re: [vtk-developers] VTK and QT5 Errors in Windows
To: Jean-Christophe Fillion-Robin <jchris.fillionr at kitware.com>


Hi Jc,
  (please ignore the last message it suffers from premature sending
syndrome!).

   I can confirm that I have configured as outlined in your commit message,
I manually set:
 -DCMAKE_PREFIX_PATH:STRING="C:\Qt\Qt5.0.2\5.0.2\msvc2012_64"
and
 -DVTK_QT_VERSION:STRING="5"
in the CMake GUI.
I still get the following error when I then configure (after selecting the
VTK_Group_Qt module):

CMake Error at GUISupport/Qt/Testing/Cxx/CMakeLists.txt:21
(set_target_properties):

set_target_properties called with incorrect number of arguments.


The Qt5 variables (${Qt5Widgets_INCLUDE_DIRS}, ${Qt5Widgets_DEFINITIONS},
${Qt5Widgets_EXECUTABLE_COMPILE_FLAGS}) at this point are:

Qt5 Includes:
C:/Qt/Qt5.0.2/5.0.2/msvc2012_64/include/QtWidgets;C:/Qt/Qt5.0.2/5.0.2/msvc2012_64/include/QtGui;C:/Qt/Qt5.0.2/5.0.2/msvc2012_64/include/QtCore;C:/Qt/Qt5.0.2/5.0.2/msvc2012_64/include/;C:/Qt/Qt5.0.2/5.0.2/msvc2012_64//mkspecs/win32-msvc2012

Qt5 Definitions: -DQT_WIDGETS_LIB;-DQT_GUI_LIB;-DQT_CORE_LIB

Qt5 Widgets:


Note that in Ubuntu (which builds with no errors), these variables have the
following values;
Qt5 Includes:
/usr/include/qt5/;/usr/include/qt5/QtWidgets;/usr/include/qt5/QtGui;/usr/include/qt5/QtCore;/usr/lib/x86_64-linux-gnu/qt5//mkspecs/linux-g++-64
Qt5 Definitions: -DQT_WIDGETS_LIB;-DQT_GUI_LIB;-DQT_CORE_LIB
Qt5 Widgets compile flags: -fPIE


It is possible to then generate a solution and build.
This build error occurs on line 60 of gl.h:
Error 56 error C2371: 'GLdouble' : redefinition; different basic types
C:\Program
Files (x86)\Windows Kits\8.0\Include\um\GL\gl.h 60 1 vtkGUISupportQtOpenGL


It seems to have found all the Qt stuff correctly. The CMakeCache.txt file
is attached, I can't see anything unusual in it.

To confirm QT5 is working correctly, I created a simple test and everything
seems Ok. So I am pretty sure my system is set up correctly. See the
attached HelloWorld.zip.

I think there may be two issues here:
1) In the configuration the Qt5 compile widgets flags are empty - this may
be causing the incorrect number of arguments error.
2) The redefinition error when building implies to me that the windows
definition of GLdouble is not the same as the VTK definition.

Regards
 Andrew




On Mon, Jun 10, 2013 at 9:58 AM, Andrew Maclean
<andrew.amaclean at gmail.com>wrote:

> Hi Jc,
>    I can confirm that I have configured as outlined in your commit
> message, I manually set:
>  -DCMAKE_PREFIX_PATH:STRING="C:\Qt\Qt5.0.2\5.0.2\msvc2012_64"
> and
> -DVTK_QT_VERSION:STRING="5"
>
>
> On Mon, Jun 10, 2013 at 3:16 AM, Jean-Christophe Fillion-Robin <
> jchris.fillionr at kitware.com> wrote:
>
>> Hi Andrew,
>>
>> Qt5 support for VTK 6 has just been integrated. Could you confirm that
>> you configured VTK as detailed in the commit message ?
>> See
>> https://github.com/Kitware/VTK/commit/384636ec9f442db83c8b827d7eabc7ada9ef8d35
>>
>> Hth
>> Jc
>>
>>
>> On Sun, Jun 9, 2013 at 1:30 AM, Andrew Maclean <andrew.amaclean at gmail.com
>> > wrote:
>>
>>> Just letting you know there is a problem with the QT5 and VTK
>>> combination in windows.
>>>
>>> System: Windows 8
>>> Compiler VS Express 2012 64-bit.
>>> QT Version: 5.0.2
>>> QTDIR=C:\Qt\Qt5.0.2\5.0.2\msvc2012_64\mkspecs
>>> PATH contains: C:\Qt\Qt5.0.2\5.0.2\msvc2012_64\bin
>>>
>>> When configuring VTK on an empty build directory, CMake is unable to
>>> find mkspecs. Consequently it cannot find qtcore.lib.
>>>
>>> So I manually select VTK_QT=5, specify qtcore.lib (debug/release) and
>>> then generate fails with:
>>>
>>> CMake Error at GUISupport/Qt/Testing/Cxx/CMakeLists.txt:21
>>> (set_target_properties):
>>>
>>> set_target_properties called with incorrect number of arguments.
>>>
>>>
>>>
>>> Build fails with:
>>> Error 141 error C2371: 'GLdouble' : redefinition; different basic types C:\Program
>>> Files (x86)\Windows Kits\8.0\Include\um\GL\gl.h 60 1
>>> vtkGUISupportQtOpenGL
>>>
>>>
>>> Regards
>>>    Andrew
>>> --
>>> ___________________________________________
>>> Andrew J. P. Maclean
>>>
>>> ___________________________________________
>>>
>>> _______________________________________________
>>> Powered by www.kitware.com
>>>
>>> Visit other Kitware open-source projects at
>>> http://www.kitware.com/opensource/opensource.html
>>>
>>> Follow this link to subscribe/unsubscribe:
>>> http://www.vtk.org/mailman/listinfo/vtk-developers
>>>
>>>
>>>
>>
>>
>> --
>> +1 919 869 8849
>>
>
>
>
> --
> ___________________________________________
> Andrew J. P. Maclean
>
> ___________________________________________
>



-- 
___________________________________________
Andrew J. P. Maclean

___________________________________________



-- 
___________________________________________
Andrew J. P. Maclean

___________________________________________
-------------- next part --------------
An HTML attachment was scrubbed...
URL: <http://public.kitware.com/pipermail/vtk-developers/attachments/20130611/9f3f4f7c/attachment.html>
-------------- next part --------------
A non-text attachment was scrubbed...
Name: CMakeCache.zip
Type: application/zip
Size: 38956 bytes
Desc: not available
URL: <http://public.kitware.com/pipermail/vtk-developers/attachments/20130611/9f3f4f7c/attachment-0002.zip>
-------------- next part --------------
A non-text attachment was scrubbed...
Name: HelloWorld.zip
Type: application/zip
Size: 720 bytes
Desc: not available
URL: <http://public.kitware.com/pipermail/vtk-developers/attachments/20130611/9f3f4f7c/attachment-0003.zip>


More information about the vtk-developers mailing list