[Ctk-developers] getting things to work in windows

Arnaud GELAS arnaud_gelas at hms.harvard.edu
Thu Jan 13 13:57:06 EST 2011


Hi Mark,

Here we use vtk with Qt 4.7.1, on Windows 7 32 bits and 64 bits without 
any problem (with msvc 2008 and 2010).
We recompile every time Qt ourself (cause they never deliver the 64 bit 
versions).

Note it took us some time to find out the right set of options to use, 
but at the end it works fine...

My 2cts,
Arnaud

On 01/13/2011 01:43 PM, Mark Roden wrote:
> Hi Julien,
>
> Ah, this may be why I'm unable to run cmake directly-- there is no
> qmake in my d:\qt\bin directory, only in the qmake directory.
>
> There is a d:\qt\qt\bin directory that has a qmake in it.  Hopefully,
> it's the same thing.
>
> I get this error next:
> CMake Error at C:/Program Files (x86)/CMake
> 2.8/share/cmake-2.8/Modules/FindQt4.cmake:788 (MESSAGE):
>    It appears you're trying to use Visual Studio with Qt built by mingw
> Call Stack (most recent call first):
>    CMake/ctkMacroSetupQt.cmake:29 (FIND_PACKAGE)
>    CMakeLists.txt:280 (ctkMacroSetupQt)
>
> Since I selected the option to allow qt to install mingw on my system,
> I then deleted the cmake cache and tried to rerun with the option to
> use mingw as the makefile generator, resulting in:
> CMake Error: CMake was unable to find a build program corresponding to
> "MinGW Makefiles".  CMAKE_MAKE_PROGRAM is not set.  You probably need
> to select a different build tool.
> CMake Error: CMake was unable to find a build program corresponding to
> "MinGW Makefiles".  CMAKE_MAKE_PROGRAM is not set.  You probably need
> to select a different build tool.
> CMake Error: Error required internal CMake variable not set, cmake may
> be not be built correctly.
> Missing variable is:
> CMAKE_C_COMPILER_ENV_VAR
> CMake Error: Error required internal CMake variable not set, cmake may
> be not be built correctly.
> Missing variable is:
> CMAKE_C_COMPILER
> CMake Error: Could not find cmake module
> file:D:/src/ctk/CTK-build64/CMakeFiles/CMakeCCompiler.cmake
> CMake Error: Error required internal CMake variable not set, cmake may
> be not be built correctly.
> Missing variable is:
> CMAKE_CXX_COMPILER_ENV_VAR
> CMake Error: Error required internal CMake variable not set, cmake may
> be not be built correctly.
> Missing variable is:
> CMAKE_CXX_COMPILER
> CMake Error: Could not find cmake module
> file:D:/src/ctk/CTK-build64/CMakeFiles/CMakeCXXCompiler.cmake
> CMake Error: CMAKE_C_COMPILER not set, after EnableLanguage
> CMake Error: CMAKE_CXX_COMPILER not set, after EnableLanguage
> Configuring incomplete, errors occurred!
>
> Any thoughts on where to go next?
>
> I personally think that this is a cmake problem-- it appears that Qt
> changed their versioning to be more year-based than straight number
> based, and that cmake hasn't updated their module to reflect that.  I
> can't build vtk with the most recent qt either.
>
> Mark
>
>
>
> On Wed, Jan 12, 2011 at 4:34 PM, Julien Finet<julien.finet at kitware.com>  wrote:
>> Hi Mark,
>> You should use the qmake.exe located in D:/Qt/2010.05/qt/bin instead of
>>   D:/Qt/2010.05/qt/qmake
>> No need to add the qt dir in the path nor locate it anywhere special.
>> Julien.
>> On Wed, Jan 12, 2011 at 7:13 PM, Mark Roden<mmroden at gmail.com>  wrote:
>>> Changing the install directory to d:/qt did not work.  I don't have
>>> any space left on my c: drive; is that the only way to get qt and ctk
>>> to work well together, to have it be on the root drive?
>>>
>>> Thanks,
>>> Mark
>>>
>>> On Wed, Jan 12, 2011 at 2:57 PM, Mark Roden<mmroden at gmail.com>  wrote:
>>>> OK, I'll check it out.
>>>>
>>>> Is that a bug in the cmake module then?  I feel like there should be
>>>> some place where I can specify, exactly, where qt is.
>>>>
>>>> Thanks,
>>>> Mark
>>>>
>>>> On Wed, Jan 12, 2011 at 2:53 PM, Dean Inglis<dean.inglis at camris.ca>
>>>> wrote:
>>>>> Hi Mark,
>>>>>
>>>>> I had similar issues when building VTK with QT GUI support.
>>>>> Try installing Qt ( qt-win-opensource-4.7.1-vs2008.exe)
>>>>> to just D:/Qt as root instead of
>>>>> D:/Qt/2010.05, add D:/Qt/bin and D:/Qt/qt/bin to
>>>>> your path environment variable.  I installed to C:/Qt
>>>>> even though all my development is done on a D: drive
>>>>> and those issues issues have since resolved.
>>>>>
>>>>> Dean
>>>>>
>>>>>
>>>>> ----- Original Message ----- From: "Mark Roden"<mmroden at gmail.com>
>>>>> To:<ctk-developers at commontk.org>
>>>>> Cc: "Alexandre Gouaillard"<agouaillard at gmail.com>
>>>>> Sent: Wednesday, January 12, 2011 5:37 PM
>>>>> Subject: [Ctk-developers] getting things to work in windows
>>>>>
>>>>>
>>>>>> Hi all,
>>>>>>
>>>>>> I'm a developer who's working on gdcm/itk/vtk, and now am trying to
>>>>>> familiarize myself with ctk.  I apologize if this email should go to a
>>>>>> 'users' list instead of a developers list, but google finds too many
>>>>>> instances of 'Christ The King' for ctk to be helpful.  Also, the list
>>>>>> that appears here doesn't contain a users version of the list (for itk
>>>>>> or vtk either, for that matter):
>>>>>>
>>>>>> http://public.kitware.com/cgi-bin/mailman/listinfo/ctk-users
>>>>>>
>>>>>> Anyway, I can't get ctk to build on my machine (Windows 7 x64,
>>>>>> vs2008).  I've installed Qt 2010.5, lgpl edition, including mingw.
>>>>>> Trying to build ctk from the git head produces the following error,
>>>>>> regardless of using 32bit or 64 bit compilers:
>>>>>>
>>>>>> CMake Error at CMake/ctkMacroSetupQt.cmake:55 (MESSAGE):
>>>>>>   error: Qt4 was not found on your system.  You probably need to set
>>>>>> the
>>>>>>   QT_QMAKE_EXECUTABLE variable
>>>>>> Call Stack (most recent call first):
>>>>>>   CMakeLists.txt:280 (ctkMacroSetupQt)
>>>>>>
>>>>>> I've found the qmake exe, it's located in
>>>>>> D:/Qt/2010.05/qt/qmake/qmake.exe, but then the cmake file reruns and
>>>>>> changes that value to D:/Qt/2010.05/qt/qmake/qmake.exe-NOTFOUND, which
>>>>>> is clearly incorrect.  Changing that value by hand also produces the
>>>>>> following warning:
>>>>>>
>>>>>> Warning: QT_QMAKE_EXECUTABLE reported QT_INSTALL_LIBS as
>>>>>>
>>>>>>
>>>>>> C:/qt-greenhouse/Trolltech/Code_less_create_more/Trolltech/Code_less_create_more/Troll/4.6/qt/lib
>>>>>> Warning:
>>>>>>
>>>>>> C:/qt-greenhouse/Trolltech/Code_less_create_more/Trolltech/Code_less_create_more/Troll/4.6/qt/lib
>>>>>> does NOT exist, Qt must NOT be installed correctly.
>>>>>>
>>>>>> I have no qt-greenhouse directory in the C: drive, so I'm not sure
>>>>>> where those values are coming from.
>>>>>>
>>>>>> Thanks for any help,
>>>>>> Mark
>>>>>> _______________________________________________
>>>>>> Ctk-developers mailing list
>>>>>> Ctk-developers at commontk.org
>>>>>> http://public.kitware.com/cgi-bin/mailman/listinfo/ctk-developers
>>>>>
>>> _______________________________________________
>>> Ctk-developers mailing list
>>> Ctk-developers at commontk.org
>>> http://public.kitware.com/cgi-bin/mailman/listinfo/ctk-developers
>>
> _______________________________________________
> Ctk-developers mailing list
> Ctk-developers at commontk.org
> http://public.kitware.com/cgi-bin/mailman/listinfo/ctk-developers




More information about the Ctk-developers mailing list