[vtkusers] VISUAL C++ Express 2005 HELP!

Xin Guan xinvar at gmail.com
Tue Aug 22 12:09:08 EDT 2006


Hi,

Here's a step-by-step guide on how to compile VTK/ITK with VC8 Express  (i.e.
VISUAL C++ Express 2005 ). I tried it many times until I came up with this.
Let me know if you have problems. Note that whatever says about ITK is true
on VTK as well.


1. Download and install VS8. You need administrator privilege to install.
2. Download and install the Windows Platform
SDK<http://www.microsoft.com/downloads/details.aspx?FamilyId=0BAF2B35-C656-4969-ACE8-E4C0C0716ADB&displaylang=en>.
It's titled "Windows Server 2003" but it covers all the current versions of
windows. You need core SDK and potentially Internet Development SDK

3. Download ITK and extract it. Do NOT change the extracted ITK folder name;
otherwise it will have problem compiling.
4. Open VC++ Express, at *Menu->Tools->Options: Projects and Solutions->VC++
Directories: *

    1. Change the "*Show directories…*" drop list to "*Include Files*"
      and add "*c:\Program Files\Microsoft SDK\include*" (or wherever
      you installed the SDK).
      2. Change to "*Library Files*" and add "*c:\Program
      Files\Microsoft SDK\Lib*" (or wherever).
      3. Click ok to accept those changes.

5. Change *C:\Program Files\Microsoft Visual Studio
8\VC\VCProjectDefaults\corewin_express.vsprops* to:


<?xml version="1.0"?>

<VisualStudioPropertySheet

        ProjectType="Visual C++"

        Version="8.00"

        Name="Core Windows Libraries">

        <Tool

                Name="VCLinkerTool"

                AdditionalDependencies="

comctl32.lib rpcrt4.lib wsock32.lib odbc32.lib user32.lib shell32.lib
gdi32.lib kernel32.lib comdlg32.lib ole32.lib oleaut32.lib advapi32.lib " />



        <Tool

                Name="VCCLCompilerTool"

                PreprocessorDefinitions="_CRT_SECURE_NO_DEPRECATE;

                                        _CRT_NONSTDC_NO_DEPRECATE" />
</VisualStudioPropertySheet>

6. Use cmake (version >= 2.4) to generate the VC++ Express solution for ITK.
 a. Check the *Advanced Options* checkbox.

 b. Click *config*. In the arguments of the following parameters, change
/MD[d] to */MT[d]* (from Multi-threaded DLL to Multi-threaded):

CMAKE_CXX_FLAGS_DEBUG

CMAKE_CXX_FLAGS_RELEASE

CMAKE_C_FLAGS_DEBUG

CMAKE_C_FLAGS_RELEASE

 c. Build VTK. If you chose not to build examples, it's fairly quick.



7. In your own project,
 a. Properties->C/C++ -> General: -> Additional Include Directories: *Add
VTK include directories*
 b. Code Generation ->Runtime Library:         */MT[D] (Multi-threaded)*
 c. Linker->General:->Additional Library Directories:    *Add VTK library
directories*
 d. Linker->General:->Input:   Additional Dependencies *Add VTK libraries*

Good luck!
- xin


On 8/21/06, Ugur BOZKAYA <u.bozkaya at fmcon.com> wrote:
>
> Hi,
> I managed to build it. But it is quite time consuming. I would recommend
> to use vstudio .net or full version of 2005. In express edition you need
> to install SDK additionally and also have to configure some options. The
> worst part is that I had many times trouble with cmake which gave me an
> annoying error on big endian definitions.
>
> good luck
>
> Ugur
>
> vtk loader wrote:
> >
> > Dear All,
> >
> > has anybody developed vtk applications using visual c++ express 2005?
> > I have tried to find some previous release, but those have been kept
> > away from the web…
> >
> > Can somebody help me/give me his experience? I need to develop using
> > c++…is it easier to use Borland c++ platform?
> >
> > Thanks
> >
> > Giorgio
> >
> > ------------------------------------------------------------------------
> >
> > _______________________________________________
> > This is the private VTK discussion list.
> > Please keep messages on-topic. Check the FAQ at:
> http://www.vtk.org/Wiki/VTK_FAQ
> > Follow this link to subscribe/unsubscribe:
> > http://www.vtk.org/mailman/listinfo/vtkusers
> >
>
> _______________________________________________
> This is the private VTK discussion list.
> Please keep messages on-topic. Check the 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/20060822/1d7a97cf/attachment.htm>


More information about the vtkusers mailing list