[vtkusers] Building VTK on WIN7 using all static libs

Alex Malyushytskyy alexmalvtk at gmail.com
Wed Oct 26 18:02:52 EDT 2011


I don't think it is a good idea to couple dynamic linking option and
choice of static or dynamic CRT.
This might be a big problem on Windows.

I often build static libraries as used as a modulus for different
applications and have to create two versions:
once linked to static CRTs, another to dynamic libraries.

This is a pain, but since you can't mix CRTs in the same application
you have to have a choice.
This does apply to VTK.


So BUILD_SHARED_LIBS flag supposed to affect only libraries you build,
not libraries you are going to link to.

If you need control which CRT to use you need different flag.

And I believe this is set in
CMAKE_CXX_FLAGS_XXXX

where _XXXX might be MINSIZEREL, etc


Regards,
   Alex

On Wed, Oct 26, 2011 at 5:18 AM, John Drescher <drescherjm at gmail.com> wrote:
>> Even you link vtk statically, you probably still want to link to dynamic
>> vc++ runtime.
>>
>
> I prefer it that way.
>
> John
> _______________________________________________
> 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
>



More information about the vtkusers mailing list