[vtkusers] cmake verison

Ming Huang minghuangvtk at yahoo.com
Wed Sep 7 23:41:47 EDT 2011


My problem is at step 11.  At this point I get a lot of errors from cmake 
Check for working C compiler using: Visual Studio 9 2008 Win64 -- broken
CMake Error at C:/Program Files (x86)/CMake 2.8/share/cmake-2.8/Modules/CMakeTestCCompiler.cmake:52 (MESSAGE):
The C compiler "cl" is not able to compile a simple test program.
It fails with the following output:
Change Dir: C:/VTKBuild/CMakeFiles/CMakeTmp
Run Build Command:C:\PROGRA~2\MICROS~1.0\Common7\IDE\VCExpress.exe
CMAKE_TRY_COMPILE.sln /build Debug /project cmTryCompileExec
Microsoft (R) Visual C++ Express Edition Version 9.0.30729.1.
Copyright (C) Microsoft Corp 2007.  All rights reserved.
The project consists entirely of configurations that require support for
platforms which are not installed on this machine.  The project cannot be
loaded.
The project consists entirely of configurations that require support for
platforms which are not installed on this machine.  The project cannot be
loaded.
Invalid project
Use:
vcexpress [solutionfile | projectfile | anyfile.ext] [switches]
The first argument for devenv is usually a solution file or project file.
You can also use any other file as the first argument if you want to have
the
file open automatically in an editor.  When you enter a project file, the
IDE
looks for an .sln file with the same base name as the project file in the
parent directory for the project file.  If no such .sln file exists, then
the
IDE looks for a single .sln file that references the project.  If no such
single
.sln file exists, then the IDE creates an unsaved solution with a default
.sln
file name that has the same base name as the project file.
Command line builds:
devenv solutionfile.sln /build [ solutionconfig ] [ /project
projectnameorfile [ /projectconfig name ] ]
Available command line switches:
/Log		Logs IDE activity to the specified file for troubleshooting.
/ResetSettings	Restores the IDE's default settings, optionally resets to
the specified VSSettings file.
/SafeMode	Launches the IDE in safe mode loading minimal windows.
Product-specific switches:
/debugexe	Open the specified executable to be debugged.  The
remainder of the command line is passed to this
executable as its arguments.
/useenv		Use PATH, INCLUDE, LIBPATH, and LIB environment variables
instead of IDE paths for VC++ builds.
To attach the debugger from the command line, use:
VsJITDebugger.exe -p <pid>
CMake will not be able to correctly generate this project.
Call Stack (most recent call first):
CMakeLists.txt:5 (PROJECT)
Configuring incomplete, errors occurred!


________________________________
From: N David Brown <hubdave at gmail.com>
To: Ming Huang <minghuangvtk at yahoo.com>
Cc: "vtkusers at vtk.org" <vtkusers at vtk.org>
Sent: Wednesday, September 7, 2011 3:37 PM
Subject: Re: [vtkusers] cmake verison


Ming - I'll assume you're on a Windows machine and have downloaded and installed Visual Studio 2008 Express.


	1. Download VTK latest source.
	2. Download CMake latest version.
	3. Install CMake.
	4. Create new directory VTKDir somewhere (can be called anything).
	5. Create new directory VTKBuild somewhere (can be called anything).

	6. Extract VTK source into VTKDir - directory structure should then look like VTKDir/Common, VTKDir/CMake etc.
	7. Run CMake-GUI.
	8. Set "Where is the source code:" field to VTKDir path (i.e. path/to/VTKDir)

	9. Set "Where to build the binaries:" field to VTKBuild path (i.e. path/to/VTKBuild)
	10. Click 'Configure' and select Visual Studio 2008 (or VS 2008 64bit if you want to build 64 bit).

	11. New fields will appear above. Set VTK_DATA_PATH to VTKDir path.
	12. If you want to build .dll files as well as .lib files then tick box for BUILD_SHARED_LIBS
	13. If you want to use with KWWidgets then tick box for WRAP_TCL
	14. Click 'Configure' again. Wait until done.

	15. Click 'Generate'. Wait until done.
	16. Open Windows Explorer (file browser), navigate to VTKBuild/, open VTK.sln (double click, will open in Visual Studio 2008).
	17. Choose Debug or Release in dropdown in middle of toolbar near top of Visual Studio 2008.

	18. Right click on solution - this is topmost entry in project navigator on left, and choose 'Build Solution'
	19. It'll take a while to build. Once finished, you'll see a final output at the bottom of the console in VS2008 which should say e.g. "27 Succeeded, 0 Errors"
	20. Once built, libs and dlls are in VTKBuild/bin/Debug or VTKBuild/bin/Release depending on whether you built as Debug or Release.
After that you'll need to set up includes in your own code project's settings to import all necessary libs from VTKBuild/binDebug (or Release). You'll also need to copy dlls from that same folder (assuming you've built dlls) into your project's executable directory.

HTH

Dave



On 7 September 2011 20:53, Ming Huang <minghuangvtk at yahoo.com> wrote:

The tutorial to install vtk uses cmake 2.4.6 but it doesn't seem to be available online anymore.  The earliest version available is 2.6.4, and I think this make it harder to install vtk , because it doesn't seem to work for me
>
>_______________________________________________
>Powered by www.kitware.com
>
>Visit other Kitware open-source projects at http://www.kitware.com/opensource/opensource.html
>
>Please keep messages on-topic and check the VTK FAQ at: http://www.vtk.org/Wiki/VTK_FAQ
>
>Follow this link to subscribe/unsubscribe:
>http://www.vtk.org/mailman/listinfo/vtkusers
>
>
-------------- next part --------------
An HTML attachment was scrubbed...
URL: <http://www.vtk.org/pipermail/vtkusers/attachments/20110907/28e4a7f2/attachment.htm>


More information about the vtkusers mailing list