[vtkusers] /MD(d) vs /MT(d)
John Platt
jcplatt at dsl.pipex.com
Wed Jun 25 16:33:26 EDT 2014
Hi Goodwin,
"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."
would be very nice and save a lot of work as you note.
John.
----- Original Message -----
From: Goodwin Lawlor
To: Kischell, Eric R.
Cc: VTK Users
Sent: Wednesday, June 25, 2014 5:03 PM
Subject: Re: [vtkusers] /MD(d) vs /MT(d)
Hi Erik,
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.
Your case wouldn't hold for all people though - you can build static VTK libs against shared C runtimes if you need to.
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.
Thanks,
Goodwin
On Wed, Jun 25, 2014 at 4:39 PM, Kischell, Eric R. <Kischell.Eric at mayo.edu> wrote:
Maarten,
Here is my note from a long time ago…
vtkParallelCore-6.1 should be manually built the same way as all of the other libs in the calling chain.
> You said-- BUILD_SHARED_LIBS is checked
Hello VTK Lurkers,
When building VTK 5.8 as a static library under WIN7 using C-Make 2.8.6…
I un-check BUILD_SHARED_LIBS under the C-Make GUI.
The generated VC++ 2005 solution contains projects with
C / C++ | Code Generation set to
/MD instead of the correct /MT (Multi-threaded (/MT)).
I must then manually change all of the /MD's to /MT's under the C-Make GUI's advanced settings.
It would be more convenient to have C-Make automatically set to /MT and /MTd
if BUILD_SHARED_LIBS is un-checked.
thx
From: vtkusers [mailto:vtkusers-bounces at vtk.org] On Behalf Of Maarten Beek via vtkusers
Sent: Wednesday, June 25, 2014 10:16 AM
To: Goodwin Lawlor
Cc: VTK Users
Subject: Re: [vtkusers] /MD(d) vs /MT(d)
Thanks for the reply.
That's what I am trying to achieve.
I am building an app that is linking to statically built libs, so I want to build my VTK statically as well.
But the build breaks at the vtkParallelCore-6.1 project.
A debug assertion fails when vtkHashSource-6.1.exe is run:
dbgheap.c line 1322
Expression: _CrtIsValidHeapPointer(pUserData)
Maarten
On Tuesday, June 24, 2014 6:15:20 PM, Goodwin Lawlor <goodwin.lawlor.lists at gmail.com> wrote:
Hi Maarten,
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 msvcrt.lib (shared).
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.
hth,
Goodwin
On Mon, Jun 23, 2014 at 8:08 PM, Maarten Beek via vtkusers <vtkusers at vtk.org> wrote:
Hello,
I can build VTK 6.1.0 perfectly fine with the default /MD(d) settings.
When I change /MD(d) into /MT(d) in CMake, the build breaks at the vtkParallelCore-6.1 project.
BUILD_SHARED_LIBS is checked, as is VTK_Group_Qt.
Anyone able to tell me how to build VTK with the /MT(d) setting?
Thanks - Maarten
_______________________________________________
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://public.kitware.com/mailman/listinfo/vtkusers
------------------------------------------------------------------------------
_______________________________________________
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://public.kitware.com/mailman/listinfo/vtkusers
-------------- next part --------------
An HTML attachment was scrubbed...
URL: <http://public.kitware.com/pipermail/vtkusers/attachments/20140625/ea16c6b8/attachment.html>
More information about the vtkusers
mailing list