[Insight-developers] Attempting to compile itk on Windows: VC++

Luis Ibanez luis . ibanez at kitware . com
Fri, 21 Jun 2002 18:51:26 -0400


Hi Joetta,

Thanks for resending the attachments.

You can safely ignore all the warnings (we shouold get rid of them
at some point but right now they are not indicating serious conditions).

The last error :

LINK : fatal error LNK1104: cannot open file "vtkRendering.lib"
Error executing link.exe.


Is due to a problem in your CMake configuration.

Your configuration is not finding a VTK library : vtkRendering

So this is not an ITK problem directly.  It just means that the
VTK path that you provided to CMake is not what it is expecting.



Here is the logic about setting up VTK

1) You set "USE_VTK=ON"

2) click on configure

3) You should decide if you want to use INSTALLED or BUILT VTK.

    Installed: is if you downloaded a binary version of VTK
    Built:     is if you compiled VTK by yourself in your machine.

    so you have two options: USE_INSTALLED_VTK or USE_BUILT_VTK
    if you set one to "ON" the other must be set to "OFF"
     CMake will warn you otherwise.

4) Depending on you choice for Installed or Build VTK
    now you have to provide the path to where VTK is.

    If you selected BUILT, you have to give the path to where
    the file "UseVTK.cmake" is in your disk. Write this down
    on VTK_BINARY_PATH.
	
    or (exclusive)

    If you selected INSTALLED you have to give the path to where
    the /vtk/UseVTK.cmake is. Note that it is the directory over
    the "vtk" subdir. You write this down on VTK_INSTALL_PATH



If those path are provided correctly, CMake should be able to
configure your VC++ projects in such a way that VTK libraries
can be found at link time.

Please let us know if you find any problems,

   Thanks

     Luis


=================================================================
Joetta Anderson wrote:
> Hi Luis,
> 
> I noticed the first time I sent an email my attachments didn't get sent,
> however, I did resend the email to insight-developers@public.kitware.com
> with attachments that were sent(I did a CC: to myself in which I
> received the attachments).  I will do another email to you with the same
> info so hopefully the attachments will reach you one way or another.
> 
> Thanks much for getting back to me.
> J Anderson
> 
> 
>>>>Luis Ibanez <luis.ibanez@kitware.com> 06/21/02 15:58 PM >>>
>>>>
> 
> Hi Joetta,
> 
> The warning:  C4786 is harmless,
> 
> It basically say that the lenght of our variable names are
> overwhelming for VC++ which only keeps 255 caracters for
> symbol names during debuging.
> 
> If you build for Release these warning will not appear, but
> compilation will take longer since the compiler makes more
> efforts for optimizing the code.  For a first try of the
> toolkit it is probably better to use Debug mode.
> 
> In most places on the toolkit we have just disabled the warning C4786
> and prayed for Microsoft to one day start being template friendly.
> In fact most of the warnings are produced by STL classes which are
> actually standard C++.
> 
> 
> About the LNK1004, that could be a real problem...
> 
> but...for some reason your attachment didn't follow your email.
> 
> Could you please resend the error message  to the list ?
> 
> 
> Thanks
> 
> 
>     Luis
>