<!DOCTYPE HTML PUBLIC "-//W3C//DTD HTML 4.0 Transitional//EN">
<HTML><HEAD>
<META content="text/html; charset=utf-8" http-equiv=Content-Type>
<META name=GENERATOR content="MSHTML 8.00.6001.23588">
<STYLE></STYLE>
</HEAD>
<BODY bgColor=#ffffff>
<DIV><FONT size=2 face=Arial>Hi Goodwin,</FONT></DIV>
<DIV><FONT size=2 face=Arial></FONT> </DIV>
<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> </DIV>
<DIV><FONT size=2 face=Arial>would be very nice and save a lot of work as you
note.</FONT></DIV>
<DIV><FONT size=2 face=Arial></FONT> </DIV>
<DIV><FONT size=2 face=Arial>John.</FONT></DIV></DIV>
<BLOCKQUOTE
style="BORDER-LEFT: #000000 2px solid; PADDING-LEFT: 5px; PADDING-RIGHT: 0px; MARGIN-LEFT: 5px; MARGIN-RIGHT: 0px">
<DIV style="FONT: 10pt arial">----- Original Message ----- </DIV>
<DIV
style="FONT: 10pt arial; BACKGROUND: #e4e4e4; font-color: black"><B>From:</B>
<A title=goodwin.lawlor.lists@gmail.com
href="mailto:goodwin.lawlor.lists@gmail.com">Goodwin Lawlor</A> </DIV>
<DIV style="FONT: 10pt arial"><B>To:</B> <A title=Kischell.Eric@mayo.edu
href="mailto:Kischell.Eric@mayo.edu">Kischell, Eric R.</A> </DIV>
<DIV style="FONT: 10pt arial"><B>Cc:</B> <A title=vtkusers@vtk.org
href="mailto:vtkusers@vtk.org">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 class=h5>
<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>
<P>
<HR>
<P></P>_______________________________________________<BR>Powered by
www.kitware.com<BR><BR>Visit other Kitware open-source projects at
http://www.kitware.com/opensource/opensource.html<BR><BR>Please keep messages
on-topic and check the VTK FAQ at:
http://www.vtk.org/Wiki/VTK_FAQ<BR><BR>Follow this link to
subscribe/unsubscribe:<BR>http://public.kitware.com/mailman/listinfo/vtkusers<BR></BLOCKQUOTE></BODY></HTML>