[Ctk-developers] getting things to work in windows

Dean Inglis dean.inglis at camris.ca
Tue Jan 18 02:53:40 UTC 2011


Mark,

I just use nmake to compile everything.  I never use project files in the 
IDE,
which is why I open a visual studio command prompt.  I run as the sole
user: admin, and I also turn off the annoying UAC.  Maybe that has something
to do with your error.  You could also try the basic
   configure -platform win32-msvc2008
which will give you dsp and proj files to build in the IDE (debug and 
release)
and maybe that would bypass the error.

Dean

----- Original Message ----- 
From: "Mark Roden" <mmroden at gmail.com>
To: "Dean Inglis" <dean.inglis at camris.ca>
Cc: <ctk-developers at commontk.org>
Sent: Monday, January 17, 2011 9:37 PM
Subject: Re: [Ctk-developers] getting things to work in windows


Hi Dean,

I followed your directions:
>> configure -debug -no-dsp -no-vcproj -platform win32-msvc2008
>>
>> then wait a long time, then type "nmake" and wait even longer
>>

and got this error:

mt.exe : general error c101008d: Failed to write the updated manifest
to the resource of file "release\updater.exe". Access is denied.
NMAKE : fatal error U1077: '"C:\Program Files\Microsoft
SDKs\Windows\v6.0A\bin\mt.exe"' : return code '0x1f'
Stop.
NMAKE : fatal error U1077: '"C:\Program Files (x86)\Microsoft Visual
Studio 9.0\VC\BIN\nmake.exe"' : return code '0x2'
Stop.
NMAKE : fatal error U1077: 'cd' : return code '0x2'
Stop.
NMAKE : fatal error U1077: 'cd' : return code '0x2'
Stop.
NMAKE : fatal error U1077: 'cd' : return code '0x2'
Stop.

This is really very strange, that everything would just end up so
broken.  Are you running as administrator or something similar?

Thanks,
Mark

On Mon, Jan 17, 2011 at 3:22 PM, Mark Roden <mmroden at gmail.com> wrote:
> Hi Dean,
>
> Thanks for this, trying it now.
>
> Why no proj/dsp? Are you using a cygwin compiler or something
> similar? Or does that just mean it's not an openable project in
> visual studio?
>
> Mark
>
> On Mon, Jan 17, 2011 at 2:48 PM, Dean Inglis <dean.inglis at camris.ca> 
> wrote:
>> FWIW, I just built CTK on Win 7 , VS 2010, 32 bit, shared build
>> using
>> http://get.qt.nokia.com/qt/source/qt-everywhere-opensource-src-4.7.1.zip
>>
>> unzipped the source and copied to D:/my_build_folder/qt-4.7.1
>>
>> in D:/my_build_folder/qt-4.7.1, at a Visual Studio Command Prompt (2010) 
>> for
>> 32 bit, type
>>
>> configure -debug -no-dsp -no-vcproj -platform win32-msvc2010
>>
>> then wait a long time, then type "nmake" and wait even longer
>>
>> git pull the latest CTK source, create a folder D:/my_build_folder/ctk 
>> and
>> in that folder
>>
>> cmake path_to_CTK_source -G"NMake Makefiles"
>>
>> fill in the CMakeCache.txt variable for QT_QMAKE_EXECUTABLE:
>>
>> QT_QMAKE_EXECUTABLE:FILEPATH=D:/my_build_folder/qt-4.7.1/bin/qmake.exe
>>
>> tell cmake where your git.exe is (mine was in cygwin)
>>
>> enable the basic gui widgets
>>
>> CTK_LIB_Widgets:BOOL=ON
>>
>> type "nmake" and wait not as long as to build Qt
>>
>> cd into CTK-built and run "ctest"
>>
>> I had no errors during the build but one test failure:
>>
>> 98% tests passed, 1 tests failed out of 62
>>
>> Label Time Summary:
>> CTKCore = 7.34 sec
>> CTKPluginFramework = 12.43 sec
>> CTKWidgets = 64.08 sec
>>
>> Total Test time (real) = 86.36 sec
>>
>> The following tests FAILED:
>> 6 - ctkCommandLineParserTest1 (Failed)
>> Errors while running CTest
>>
>> HTH,
>> Dean
>>
>>
>>
>> ----- Original Message ----- From: "Mark Roden" <mmroden at gmail.com>
>> To: "Gelas, Arnaud Joel Florent" <Arnaud_Gelas at hms.harvard.edu>
>> Cc: "Souhait, Lydie" <Lydie_Souhait at hms.harvard.edu>;
>> <ctk-developers at commontk.org>
>> Sent: Sunday, January 16, 2011 3:38 PM
>> Subject: Re: [Ctk-developers] getting things to work in windows
>>
>>
>> Yes, it doesn't work.
>>
>> On Sun, Jan 16, 2011 at 12:19 PM, Gelas, Arnaud Joel Florent
>> <Arnaud_Gelas at hms.harvard.edu> wrote:
>>>
>>> Have you looked at this one?
>>>
>>> http://www.qtforum.org/article/31561/error-when-building-libraries.html
>>>
>>>
>>> ________________________________________
>>> From: Mark Roden [mmroden at gmail.com]
>>> Sent: Sunday, January 16, 2011 3:09 PM
>>> To: Gelas, Arnaud Joel Florent
>>> Cc: Julien Finet; ctk-developers at commontk.org; Souhait, Lydie
>>> Subject: Re: [Ctk-developers] getting things to work in windows
>>>
>>> So I've tried many different solutions, including:
>>> http://www.qtcentre.org/threads/19389-Qt-4.5-clean-up-build-dir-on-Windows
>>>
>>> http://www.qtcentre.org/threads/26245-Qt-4.6-api%5Cqscriptextensionplugin.h%2843%29-Error-Undefined-interface
>>> and so forth, still no joy.
>>>
>>>
>>>> Now regarding the error, I may be wrong but I thought "C:\Program Files
>>>> (x86)\" is for 32 bit software (I may be wrong on that one)?
>>>
>>> That is true. Visual studio 2008 is 32 bit, but can still compile 64
>>> bit. The relevant portion of the error is
>>> api\qscriptextensionplugin.h(43): Error: Undefined interface
>>> Not the rest; that's just saying which program failed (in that case,
>>> nmake, which is vs2008's make).
>>>
>>>>
>>>> Do you use the qt source tarball?
>>>
>>> I did, version 4.7.1 from the website.
>>>
>>>
>>>> i.e: install QT, install the necessary SDKs. Be sure that qmake is your
>>>> path. Then, and this killed most of my problems, run in your dos 
>>>> command
>>>> box
>>>> (you will also use for starting compilation with configure) the visual
>>>> studio setup script vcvars.bat to setup all necessary environment
>>>> variables,
>>>> e. g. for me this was:
>>>> c:\Programme\Microsoft Visual Studio 9.0\VC\vcvars.bat
>>>
>>> This is the equivalent of running in the vs2008 command prompt, which 
>>> I'm
>>> doing.
>>>
>>> I think that this might be a problem with the particular version of Qt
>>> that I'm trying to use. I'm going to go to the message boards to try
>>> to find out if they have a solution for their more recent sdk versions
>>> that supposedly fix this problem.
>>>
>>> I hope it's not an issue that I'm running 64 bit windows 7.
>>>
>>> Mark
>>>
>>>
>>> On Fri, Jan 14, 2011 at 6:26 AM, Gelas, Arnaud Joel Florent
>>> <Arnaud_Gelas at hms.harvard.edu> wrote:
>>>>
>>>> Hi Mark,
>>>>
>>>> To speed up the compilation you can only compile the release libraries
>>>> (unless you want to be able to debug some qt stuff too).
>>>>
>>>> Now regarding the error, I may be wrong but I thought "C:\Program Files
>>>> (x86)\" is for 32 bit software (I may be wrong on that one)?
>>>>
>>>> Do you use the qt source tarball?
>>>>
>>>> HTH,
>>>> Arnaud
>>>>
>>>>
>>>> ________________________________________
>>>> From: Mark Roden [mmroden at gmail.com]
>>>> Sent: Thursday, January 13, 2011 7:09 PM
>>>> To: Gelas, Arnaud Joel Florent
>>>> Cc: Julien Finet; ctk-developers at commontk.org
>>>> Subject: Re: [Ctk-developers] getting things to work in windows
>>>>
>>>> So after running for however long (I went away and came back, it's not
>>>> an instant compilation), I got this compilation error:
>>>>
>>>> api\qscriptextensionplugin.h(43): Error: Undefined interface
>>>> NMAKE : fatal error U1077: 'D:\Qt\2010.05\qt\bin\moc.exe' : return code
>>>> '0x1'
>>>> Stop.
>>>> NMAKE : fatal error U1077: '"C:\Program Files (x86)\Microsoft Visual
>>>> Studio 9.0\VC\BIN\nmake.exe"' : return code '0x2'
>>>> Stop.
>>>> NMAKE : fatal error U1077: 'cd' : return code '0x2'
>>>> Stop.
>>>>
>>>> Any ideas, or just go right to the qt boards?
>>>>
>>>> On Thu, Jan 13, 2011 at 11:32 AM, Arnaud GELAS
>>>> <arnaud_gelas at hms.harvard.edu> wrote:
>>>>>
>>>>> Have a look at this:
>>>>>
>>>>> http://sourceforge.net/apps/trac/gofigure2/wiki/DeveloperSetUpWindows#a1.3Qt
>>>>>
>>>>> On 01/13/2011 02:30 PM, Mark Roden wrote:
>>>>>>
>>>>>> I want to use visual studio. One of the default Qt installation
>>>>>> options is to install mingw, so I went ahead and did it.
>>>>>>
>>>>>> I'll look into compiling qt for myself, then, in visual studio.
>>>>>>
>>>>>> Thanks,
>>>>>> Mark
>>>>>>
>>>>>> On Thu, Jan 13, 2011 at 11:05 AM, Julien
>>>>>> Finet<julien.finet at kitware.com>
>>>>>> wrote:
>>>>>>>
>>>>>>> What are you trying to achieve here? do you want to use Mingw or
>>>>>>> Visual
>>>>>>> Studio ?
>>>>>>> I'm not a user of Mingw, but it seems odd that Qt installs Mingw on
>>>>>>> your
>>>>>>> machine.
>>>>>>> How did you install mingw ? do you manage to build other projects ?
>>>>>>> If you want to use visual studio, then you need to get Qt for Visual
>>>>>>> studio
>>>>>>> (if it exists) or compile qt yourself.
>>>>>>> Julien.
>>>>>>>
>>>>>>> On Thu, Jan 13, 2011 at 11:43 AM, Mark Roden<mmroden at gmail.com> 
>>>>>>> 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
>>>>>
>>>>>
>>>>
>>>
>> _______________________________________________
>> 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