Google Groups no longer supports new Usenet posts or subscriptions. Historical content remains viewable.
Dismiss

How-to mix /MT and /MD projects in a solution

574 views
Skip to first unread message

Ed Fair

unread,
Nov 1, 2002, 10:38:11 PM11/1/02
to
Hi,
I'm having a hard time making the IDE do something I need. I've boiled it
down to this scenario:

One solution with three projects:
Project A: Static Library, uses many C++ runtime library calls.
Project B: Console App, calls functions in and depends on library A.
Project C: Console App, calls functions in and depends on library A.

I want to compile B.EXE so that the C++ runtime library "runs out of the
DLL" (/MD), and I'm trying to build C.EXE so that the runtime library "runs
out of the EXE" (/MT).

As it is, I have to manually reconfigure Project A settings every time I
want to recompile B or C. If I'm compiling B.EXE I have to first change the
Project A settings to /MD, compile Project A, then compile Project B. If I
then want to compile C.EXE I have to first change the Project A settings to
/MT, compile Project A, then compile Project C. In other words, I'm
constantly having to change the settings and recompile the static library
before I build my EXE's.

Is there an easier way to do this?

TIA,

ed


Visual C++ Team

unread,
Nov 13, 2002, 2:02:35 PM11/13/02
to
Ed, you should be able to add 2 new configurations to your static library
project: 1 that links with /MT and 1 that links with /MD. Then if you add
matching configurations to the corresponding EXE projects (A and B), then
when the IDE builds those projects it will link to the appropriate static
library configuration, thus matching your /Mx switches without having to
change them or rebuild each time.

--
Michael Maio
Kevin Frei
Visual C++ Team
This posting is provided "AS IS" with no warranties, and confers no rights.

"Ed Fair" <ed_...@yahoo.com> wrote in message
news:OCXLYfigCHA.2636@tkmsftngp08...

0 new messages