Qt 5.5 binary distributions are up to VS 2013 only. There is a test for the compiler version in one of the Qt header files that will complain if VS 2015 is detected. If you tell VS 2015 to target the 2013 toolset, these complaints go away. I don't know what happens if you build Qt yourself from source. I think the complaints will still be there unless you edit the include file to update the test for the VS version.
What I don't know is whether the Qt binary libraries (built using VS 2013) are compatible when linked to binaries compiled using VS 2015 with the default VS 2015 toolset.
My comments are based on Qt 5, not Qt 4. I don't know what happens in this case.
And the OP is talking about building VTK, not Qt.
Here is what I did just now to build VTK using VS2013 as the compiler and target for the CMake generator:
- be sure that your Qt bin and Python directories are in your environment PATH
- unzipped source distribution
- ran CMake GUI
- set unzip VTK top-level directory for "where is the source code""
- specified new "build" directory under this for "where to build the binaries"
- selected VS 2013 x64 as the generator target
- clicked Configure
- after completion, selected the following checkboxes:
- build examples
- build shared libs
- module vtk gui support Qt
- module vtk gui support Qt OpenGL
- modulr vtk python
- module vtk python interpreter
- module vtk rendering Qt
- module vtk rendering volume OpenGL
- module vtk views Qt
- VTK group Qt
- VTK wrap python
- clicked Configure again
- fixed errors (mostly paths and conflicting options)
- changed VTK_QT_VERSION to 5
- continued to click Configure until no errors reported
- clicked Generate
- when done, started VS2013, opened the VTK.sln in my "build" directory
- loaded (in my case) 343 projects
- selected the ALL_BUILD project
- clicked "build"
It takes a long time to build, especially the Python wrappings. I have Python 2.7 installed as a static library, and CMake complained that it couldn't find the Python27.dll file (because it doesn't exist in my install). I set the PYTHON_DEBUG_LIBRARY variable to empty and it stopped complaining. I do not know if VTK will work with a static Python. I'll test that later.
After the build completed, there were 92 projects that failed to build. These are all related to Python, probably because of my static library build. I'll try it again with a DLL version of the Python libraries.
Bookmarks