/MT and /MD question

alice alice 40 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

Visual Studio
Visual Studio
A family of Microsoft suites of integrated development tools for building applications for Windows, the web and mobile devices.
5,223 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,774 questions
{count} votes

1 answer

Sort by: Most helpful
  1. RLWA32 45,706 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.

    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.