all groups > visual c libraries > october 2006 >
You're in the

visual c libraries

group:

Correct Libs


Correct Libs S Wheeler
10/6/2006 10:42:51 AM
visual c libraries:
I have a DLL with mixed mode code that uses a couple of unmanaged static
libraries. I had been generating the static libraries with Code Generation
set to Single-threaded Debug (/MLd). The DLL is set to
Multi-threaded Debug DLL (/MDd) - The app that call the DLL is set to
Multi-threaded Debug (/MTd). I was reading an article that stated all libs
should be set to be consistant. Does that mean that my static libs should be
built with Multi-threaded Debug DLL (/MDd) ? And is it OK to have a
Multi-threaded Debug DLL (/MDd) DLL with an Exe that uses Multi-threaded
Debug (/MTd).

Thanks.

Re: Correct Libs David Lowndes
10/6/2006 7:37:21 PM
[quoted text, click to view]

That would be the simplest recommended way. While in some
circumstances you might not have any problem, I wouldn't count on it.

[quoted text, click to view]

It depends on whether you pass heap allocated objects or other 'C'
run-time object across the DLL boundary. If you do, all components
must be built with the shared DLL library. Since you have the DLL
run-time anyway for one component, presumably it'd be no extra
overhead (and possibly much smaller) if they all used the DLL version.

AddThis Social Bookmark Button