Share via

/MT and /MD question

alice alice 40 Reputation points
Nov 19, 2024, 12:39 AM

I build on windows and use cmake vs2022

I try to build cef project and it always show 命令列 warning D9025: 覆寫 '/MD',以 '/MT'

Is it possible for four case?

/MT => generate static lib

/MT => generate dynamic lib

/MD => generate dynamic lib

/MD => generate static lib

Visual Studio
Visual Studio
A family of Microsoft suites of integrated development tools for building applications for Windows, the web and mobile devices.
5,230 questions
C++
C++
A high-level, general-purpose programming language, created as an extension of the C programming language, that has object-oriented, generic, and functional features in addition to facilities for low-level memory manipulation.
3,776 questions
{count} votes

1 answer

Sort by: Most helpful
  1. RLWA32 45,706 Reputation points
    Nov 21, 2024, 12:22 PM

    The /MT(d) and /MD(d) options are relevant when the linker is invoked. They are documented at Compiler options listed by category and determine which libraries for the CRT are used during the linking process in the creation of an executable (i.e., an EXE or DLL). Static libraries contain object modules. When creating a static library the linker is not invoked to produce an executable.

    0 comments No comments

Your answer

Answers can be marked as Accepted Answers by the question author, which helps users to know the answer solved the author's problem.