<div dir="ltr">Hi John,<div><br></div><div>I'll raise it on the CMake list.</div><div><br></div><div>Thanks</div><div><br></div><div>Goodwin</div></div><div class="gmail_extra"><br><br><div class="gmail_quote">On Wed, Jun 25, 2014 at 9:33 PM, John Platt <span dir="ltr"><<a href="mailto:jcplatt@dsl.pipex.com" target="_blank">jcplatt@dsl.pipex.com</a>></span> wrote:<br>
<blockquote class="gmail_quote" style="margin:0 0 0 .8ex;border-left:1px #ccc solid;padding-left:1ex"><u></u>
<div bgcolor="#ffffff">
<div><font face="Arial">Hi Goodwin,</font></div>
<div><font face="Arial"></font> </div>
<div><div class="">
<div> "I'd like to see a "Use Static C Runtime Libraries"
option in CMake that adds /MT(d) to the linker options instead of /MD(d)
by default."</div>
<div> </div>
</div><div><font face="Arial">would be very nice and save a lot of work as you
note.</font></div><span class="HOEnZb"><font color="#888888">
<div><font face="Arial"></font> </div>
<div><font face="Arial">John.</font></div></font></span></div>
<blockquote style="BORDER-LEFT:#000000 2px solid;PADDING-LEFT:5px;PADDING-RIGHT:0px;MARGIN-LEFT:5px;MARGIN-RIGHT:0px"><div><div class="h5">
<div style="FONT:10pt arial">----- Original Message ----- </div>
<div style="FONT:10pt arial;BACKGROUND:#e4e4e4"><b>From:</b>
<a title="goodwin.lawlor.lists@gmail.com" href="mailto:goodwin.lawlor.lists@gmail.com" target="_blank">Goodwin Lawlor</a> </div>
<div style="FONT:10pt arial"><b>To:</b> <a title="Kischell.Eric@mayo.edu" href="mailto:Kischell.Eric@mayo.edu" target="_blank">Kischell, Eric R.</a> </div>
<div style="FONT:10pt arial"><b>Cc:</b> <a title="vtkusers@vtk.org" href="mailto:vtkusers@vtk.org" target="_blank">VTK Users</a> </div>
<div style="FONT:10pt arial"><b>Sent:</b> Wednesday, June 25, 2014 5:03
PM</div>
<div style="FONT:10pt arial"><b>Subject:</b> Re: [vtkusers] /MD(d) vs
/MT(d)</div>
<div><br></div>
<div dir="ltr">Hi Erik,
<div><br></div>
<div>You're right - CMake could be improved to make handling the C runtime
libs a little easier. They need to be edited manually in multiple places in
the CMake gui usually.</div>
<div><br></div>
<div>Your case wouldn't hold for all people though - you can build static VTK
libs against shared C runtimes if you need to.</div>
<div><br></div>
<div>I'd like to see a "Use Static C Runtime Libraries" option in CMake that
adds /MT(d) to the linker options instead of /MD(d) by default.</div>
<div><br></div>
<div>Thanks,</div>
<div><br></div>
<div>Goodwin</div>
<div><br></div></div>
<div class="gmail_extra"><br><br>
<div class="gmail_quote">On Wed, Jun 25, 2014 at 4:39 PM, Kischell, Eric R.
<span dir="ltr"><<a href="mailto:Kischell.Eric@mayo.edu" target="_blank">Kischell.Eric@mayo.edu</a>></span> wrote:<br>
<blockquote style="BORDER-LEFT:#ccc 1px solid;MARGIN:0px 0px 0px 0.8ex;PADDING-LEFT:1ex" class="gmail_quote">
<div lang="EN-US" vlink="purple" link="blue">
<div>
<p class="MsoNormal"><b><span style="FONT-FAMILY:'Calibri','sans-serif';COLOR:#4f6228;FONT-SIZE:11pt">Maarten,<u></u><u></u></span></b></p>
<p class="MsoNormal"><b><span style="FONT-FAMILY:'Calibri','sans-serif';COLOR:#4f6228;FONT-SIZE:11pt">Here
is my note from a long time ago…<u></u><u></u></span></b></p>
<p class="MsoNormal"><b><span style="FONT-FAMILY:'Calibri','sans-serif';COLOR:#4f6228;FONT-SIZE:11pt">
</span></b><b><span style="FONT-FAMILY:'Helvetica','sans-serif';COLOR:#4f6228">vtkParallelCore-6.1
should be manually built the same way as all of the other libs in the
calling chain.</span></b><b><span style="FONT-FAMILY:'Calibri','sans-serif';COLOR:#4f6228;FONT-SIZE:11pt"><u></u><u></u></span></b></p>
<p style="TEXT-INDENT:0.5in"><b><span style="FONT-FAMILY:'Century Schoolbook','serif';COLOR:green">></span></b><span style="FONT-FAMILY:'Helvetica','sans-serif';COLOR:black"> You said--
BUILD_SHARED_LIBS is checked</span><b><span style="FONT-FAMILY:'Century Schoolbook','serif';COLOR:green"><u></u><u></u></span></b></p>
<p><b><span style="FONT-FAMILY:'Century Schoolbook','serif';COLOR:green">Hello VTK
Lurkers,</span></b> <u></u><u></u></p>
<p><b><span style="FONT-FAMILY:'Century Schoolbook','serif';COLOR:green">When
building VTK 5.8 as a static library under WIN7 using C-Make
2.8.6…</span></b> <br><b><span style="FONT-FAMILY:'Century Schoolbook','serif';COLOR:green">I
</span></b><b><span style="FONT-FAMILY:'Century Schoolbook','serif';COLOR:red">un-check
</span></b><b><span style="FONT-FAMILY:'Century Schoolbook','serif';COLOR:green">BUILD_SHARED_LIBS
under the C-Make GUI.</span></b> <br><b><span style="FONT-FAMILY:'Century Schoolbook','serif';COLOR:green">The
generated VC++ 2005 solution contains projects with </span></b><br><b><span style="FONT-FAMILY:'Century Schoolbook','serif';COLOR:green">C / C++ |
Code Generation set to </span></b><br><b><span style="FONT-FAMILY:'Century Schoolbook','serif';COLOR:green">/MD instead
of the correct /MT (Multi-threaded (/MT)).</span></b> <br><b><span style="FONT-FAMILY:'Century Schoolbook','serif';COLOR:green">I must then
manually change all of the /MD's to /MT's under the C-Make GUI's advanced
settings.</span></b> <u></u><u></u></p>
<p><b><span style="FONT-FAMILY:'Century Schoolbook','serif';COLOR:green">It would be
more convenient to have C-Make automatically set to /MT and /MTd</span></b>
<br><b><span style="FONT-FAMILY:'Century Schoolbook','serif';COLOR:green">if
BUILD_SHARED_LIBS is </span></b><b><span style="FONT-FAMILY:'Century Schoolbook','serif';COLOR:red">un-checked</span></b><b><span style="FONT-FAMILY:'Century Schoolbook','serif';COLOR:green">.</span></b>
<u></u><u></u></p>
<p class="MsoNormal"><b><span style="FONT-FAMILY:'Century Schoolbook','serif';COLOR:green">thx</span></b><span style="FONT-FAMILY:'Calibri','sans-serif';COLOR:#1f497d;FONT-SIZE:11pt"><u></u><u></u></span></p>
<p class="MsoNormal"><span style="FONT-FAMILY:'Calibri','sans-serif';COLOR:#1f497d;FONT-SIZE:11pt"><u></u><u></u></span> </p>
<div>
<div style="BORDER-BOTTOM:medium none;BORDER-LEFT:medium none;PADDING-BOTTOM:0in;PADDING-LEFT:0in;PADDING-RIGHT:0in;BORDER-TOP:#b5c4df 1pt solid;BORDER-RIGHT:medium none;PADDING-TOP:3pt">
<p class="MsoNormal"><b><span style="FONT-FAMILY:'Tahoma','sans-serif';FONT-SIZE:10pt">From:</span></b><span style="FONT-FAMILY:'Tahoma','sans-serif';FONT-SIZE:10pt"> vtkusers
[mailto:<a href="mailto:vtkusers-bounces@vtk.org" target="_blank">vtkusers-bounces@vtk.org</a>] <b>On Behalf Of </b>Maarten Beek
via vtkusers<br><b>Sent:</b> Wednesday, June 25, 2014 10:16 AM<br><b>To:</b>
Goodwin Lawlor<br><b>Cc:</b> VTK Users<br><b>Subject:</b> Re: [vtkusers]
/MD(d) vs /MT(d)<u></u><u></u></span></p></div></div>
<div>
<div>
<p class="MsoNormal"><u></u><u></u> </p>
<div>
<div>
<p style="BACKGROUND:white" class="MsoNormal"><span style="FONT-FAMILY:'Helvetica','sans-serif';COLOR:black">Thanks for the
reply.<u></u><u></u></span></p></div>
<div>
<p class="MsoNormal"><span style="FONT-FAMILY:'Helvetica','sans-serif';COLOR:black"><u></u><u></u></span> </p></div>
<div>
<p class="MsoNormal"><span style="FONT-FAMILY:'Helvetica','sans-serif';COLOR:black">That's what I am
trying to achieve.<u></u><u></u></span></p></div>
<div>
<p class="MsoNormal"><span style="FONT-FAMILY:'Helvetica','sans-serif';COLOR:black">I am building an
app that is linking to statically built libs, so I want to build my VTK
statically as well.<u></u><u></u></span></p></div>
<div>
<p class="MsoNormal"><span style="FONT-FAMILY:'Helvetica','sans-serif';COLOR:black">But the build
breaks at the vtkParallelCore-6.1 project.<u></u><u></u></span></p></div>
<div>
<p class="MsoNormal"><span style="FONT-FAMILY:'Helvetica','sans-serif';COLOR:black"><u></u><u></u></span> </p></div>
<div>
<p class="MsoNormal"><span style="FONT-FAMILY:'Helvetica','sans-serif';COLOR:black">A debug
assertion fails when vtkHashSource-6.1.exe is
run:<u></u><u></u></span></p></div>
<div>
<p class="MsoNormal"><span style="FONT-FAMILY:'Helvetica','sans-serif';COLOR:black">dbgheap.c line
1322<u></u><u></u></span></p></div>
<div>
<p class="MsoNormal"><span style="FONT-FAMILY:'Helvetica','sans-serif';COLOR:black">Expression:
_CrtIsValidHeapPointer(pUserData)<u></u><u></u></span></p></div>
<div>
<p class="MsoNormal"><span style="FONT-FAMILY:'Helvetica','sans-serif';COLOR:black"><u></u><u></u></span> </p></div>
<div>
<p class="MsoNormal"><span style="FONT-FAMILY:'Helvetica','sans-serif';COLOR:black">Maarten<u></u><u></u></span></p></div>
<div>
<p style="MARGIN-BOTTOM:12pt;BACKGROUND:white" class="MsoNormal"><span style="FONT-FAMILY:'Helvetica','sans-serif';COLOR:black"><u></u><u></u></span> </p></div>
<div>
<div>
<div>
<div>
<p style="BACKGROUND:white" class="MsoNormal"><span style="FONT-FAMILY:'Arial','sans-serif';COLOR:black;FONT-SIZE:10pt">On
Tuesday, June 24, 2014 6:15:20 PM, Goodwin Lawlor <<a href="mailto:goodwin.lawlor.lists@gmail.com" target="_blank">goodwin.lawlor.lists@gmail.com</a>> wrote:</span><span style="FONT-FAMILY:'Helvetica','sans-serif';COLOR:black"><u></u><u></u></span></p>
</div>
<p style="MARGIN-BOTTOM:12pt;BACKGROUND:white" class="MsoNormal"><span style="FONT-FAMILY:'Helvetica','sans-serif';COLOR:black"><u></u><u></u></span> </p>
<div>
<div>
<div>
<div>
<p style="BACKGROUND:white" class="MsoNormal"><span style="FONT-FAMILY:'Helvetica','sans-serif';COLOR:black">Hi
Maarten,<u></u><u></u></span></p>
<div>
<p style="BACKGROUND:white" class="MsoNormal"><span style="FONT-FAMILY:'Helvetica','sans-serif';COLOR:black"><u></u><u></u></span> </p></div>
<div>
<p style="BACKGROUND:white" class="MsoNormal"><span style="FONT-FAMILY:'Helvetica','sans-serif';COLOR:black">I usually find
when you link VTK libs against the static runtime all dependent libraries
must be linked against it too... otherwise you get name collisions between
libcmt.lib (static) and </span><span style="FONT-FAMILY:'Segoe UI','sans-serif';COLOR:#2a2a2a;FONT-SIZE:10pt">msvcrt.lib
(shared).</span><span style="FONT-FAMILY:'Helvetica','sans-serif';COLOR:black"><u></u><u></u></span></p></div>
<div>
<p style="BACKGROUND:white" class="MsoNormal"><span style="FONT-FAMILY:'Helvetica','sans-serif';COLOR:black"><u></u><u></u></span> </p></div>
<div>
<p style="BACKGROUND:white" class="MsoNormal"><span style="FONT-FAMILY:'Segoe UI','sans-serif';COLOR:#2a2a2a;FONT-SIZE:10pt">So,
for example, if you generate the VTK Tcl wrapper libs, you have to build the
static Tcl libs against libcmt.lib yourself for inclusion in the
project.</span><span style="FONT-FAMILY:'Helvetica','sans-serif';COLOR:black"><u></u><u></u></span></p></div>
<div>
<p style="BACKGROUND:white" class="MsoNormal"><span style="FONT-FAMILY:'Helvetica','sans-serif';COLOR:black"><u></u><u></u></span> </p></div>
<div>
<p style="BACKGROUND:white" class="MsoNormal"><span style="FONT-FAMILY:'Helvetica','sans-serif';COLOR:black">hth,<u></u><u></u></span></p></div>
<div>
<p style="BACKGROUND:white" class="MsoNormal"><span style="FONT-FAMILY:'Helvetica','sans-serif';COLOR:black"><u></u><u></u></span> </p></div>
<div>
<p style="BACKGROUND:white" class="MsoNormal"><span style="FONT-FAMILY:'Helvetica','sans-serif';COLOR:black">Goodwin<u></u><u></u></span></p></div></div>
<div>
<p style="MARGIN-BOTTOM:12pt;BACKGROUND:white" class="MsoNormal"><span style="FONT-FAMILY:'Helvetica','sans-serif';COLOR:black"><u></u><u></u></span> </p>
<div>
<p style="BACKGROUND:white" class="MsoNormal"><span style="FONT-FAMILY:'Helvetica','sans-serif';COLOR:black">On Mon, Jun 23,
2014 at 8:08 PM, Maarten Beek via vtkusers <<a href="mailto:vtkusers@vtk.org" target="_blank">vtkusers@vtk.org</a>>
wrote:<u></u><u></u></span></p>
<div>
<div>
<div>
<div>
<p style="BACKGROUND:white" class="MsoNormal"><span style="FONT-FAMILY:'Helvetica','sans-serif';COLOR:black">Hello,<u></u><u></u></span></p></div>
<div>
<p class="MsoNormal"><span style="FONT-FAMILY:'Helvetica','sans-serif';COLOR:black"><u></u><u></u></span> </p></div>
<div>
<p class="MsoNormal"><span style="FONT-FAMILY:'Helvetica','sans-serif';COLOR:black">I can build VTK
6.1.0 perfectly fine with the default /MD(d)
settings.<u></u><u></u></span></p></div>
<div>
<p style="BACKGROUND:white" class="MsoNormal"><span style="FONT-FAMILY:'Helvetica','sans-serif';COLOR:black">When I change
/MD(d) into /MT(d) in CMake, the build breaks at the vtkParallelCore-6.1
project.<u></u><u></u></span></p></div>
<div>
<p style="BACKGROUND:white" class="MsoNormal"><span style="FONT-FAMILY:'Helvetica','sans-serif';COLOR:black"><u></u><u></u></span> </p></div>
<div>
<p class="MsoNormal"><span style="FONT-FAMILY:'Helvetica','sans-serif';COLOR:black">BUILD_SHARED_LIBS
is checked, as is VTK_Group_Qt.<u></u><u></u></span></p></div>
<div>
<p class="MsoNormal"><span style="FONT-FAMILY:'Helvetica','sans-serif';COLOR:black"><u></u><u></u></span> </p></div>
<div>
<p class="MsoNormal"><span style="FONT-FAMILY:'Helvetica','sans-serif';COLOR:black">Anyone able to
tell me how to build VTK with the /MT(d)
setting?<u></u><u></u></span></p></div>
<div>
<p class="MsoNormal"><span style="FONT-FAMILY:'Helvetica','sans-serif';COLOR:black"><u></u><u></u></span> </p></div>
<div>
<p class="MsoNormal"><span style="FONT-FAMILY:'Helvetica','sans-serif';COLOR:black">Thanks -
Maarten<u></u><u></u></span></p></div></div></div></div>
<p style="MARGIN-BOTTOM:12pt;BACKGROUND:white" class="MsoNormal"><span style="FONT-FAMILY:'Helvetica','sans-serif';COLOR:black"><br>_______________________________________________<br>Powered
by <a href="http://www.kitware.com/" target="_blank">www.kitware.com</a><br><br>Visit other Kitware open-source
projects at <a href="http://www.kitware.com/opensource/opensource.html" target="_blank">http://www.kitware.com/opensource/opensource.html</a><br><br>Please
keep messages on-topic and check the VTK FAQ at: <a href="http://www.vtk.org/Wiki/VTK_FAQ" target="_blank">http://www.vtk.org/Wiki/VTK_FAQ</a><br><br>Follow this link to
subscribe/unsubscribe:<br><a href="http://public.kitware.com/mailman/listinfo/vtkusers" target="_blank">http://public.kitware.com/mailman/listinfo/vtkusers</a><u></u><u></u></span></p></div>
<p style="BACKGROUND:white" class="MsoNormal"><span style="FONT-FAMILY:'Helvetica','sans-serif';COLOR:black"><u></u><u></u></span> </p></div></div></div>
<p style="MARGIN-BOTTOM:12pt;BACKGROUND:white" class="MsoNormal"><span style="FONT-FAMILY:'Helvetica','sans-serif';COLOR:black"><u></u><u></u></span> </p></div></div></div></div></div></div></div></div>
</div></blockquote></div><br></div>
</div></div><p>
</p><hr><div class="">
<p></p>_______________________________________________<br>Powered by
<a href="http://www.kitware.com" target="_blank">www.kitware.com</a><br><br>Visit other Kitware open-source projects at
<a href="http://www.kitware.com/opensource/opensource.html" target="_blank">http://www.kitware.com/opensource/opensource.html</a><br><br>Please keep messages
on-topic and check the VTK FAQ at:
<a href="http://www.vtk.org/Wiki/VTK_FAQ" target="_blank">http://www.vtk.org/Wiki/VTK_FAQ</a><br><br>Follow this link to
subscribe/unsubscribe:<br><a href="http://public.kitware.com/mailman/listinfo/vtkusers" target="_blank">http://public.kitware.com/mailman/listinfo/vtkusers</a><br></div><p></p></blockquote></div>
</blockquote></div><br></div>