/MT and /MD question

alice alice 100 Reputation points
2024-11-19T00:39:07.44+00:00

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

Developer technologies | C++
Developer technologies | Visual Studio | Other
{count} votes

Accepted answer
  1. RLWA32 49,636 Reputation points
    2024-11-21T12:22:02.87+00:00

    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.

    1 person found this answer helpful.
    0 comments No comments

0 additional answers

Sort by: Most helpful

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.