Skip to content
  • Categories
  • Recent
  • Tags
  • Popular
  • World
  • Users
  • Groups
Skins
  • Light
  • Cerulean
  • Cosmo
  • Flatly
  • Journal
  • Litera
  • Lumen
  • Lux
  • Materia
  • Minty
  • Morph
  • Pulse
  • Sandstone
  • Simplex
  • Sketchy
  • Spacelab
  • United
  • Yeti
  • Zephyr
  • Dark
  • Cyborg
  • Darkly
  • Quartz
  • Slate
  • Solar
  • Superhero
  • Vapor

  • Default (No Skin)
  • No Skin
Collapse
Code Project
  1. Home
  2. General Programming
  3. C / C++ / MFC
  4. Compiler Switches /MD and MT

Compiler Switches /MD and MT

Scheduled Pinned Locked Moved C / C++ / MFC
questionannouncementai-codingdebugging
2 Posts 2 Posters 0 Views 1 Watching
  • Oldest to Newest
  • Newest to Oldest
  • Most Votes
Reply
  • Reply as topic
Log in to reply
This topic has been deleted. Only users with topic management privileges can see it.
  • N Offline
    N Offline
    nde_plume
    wrote on last edited by
    #1

    What is the difference in terms of code generation with these two switches? I understand one if for DLL code and one for Multithread code, but it seems that this means I need to generate four static library versions with each library (six if I include single threaded), since I need a release and debug version. Are people really generating six versions of each static library or am I just missing something important?

    S 1 Reply Last reply
    0
    • N nde_plume

      What is the difference in terms of code generation with these two switches? I understand one if for DLL code and one for Multithread code, but it seems that this means I need to generate four static library versions with each library (six if I include single threaded), since I need a release and debug version. Are people really generating six versions of each static library or am I just missing something important?

      S Offline
      S Offline
      sthotakura
      wrote on last edited by
      #2

      When you specify /MD the compiler will link MSVCRT.LIB(MSVCRT.dll/MSVCR71.dll must be available at runtime) to your object code. If you use /MT the compiler will link the static version of C runtime (LIBCMT.lib) to your application. There is no need for you to generate four static library versions. You can choose either of these two. Multi-threaded runtime DLL Version(/MD) - Or Multi-threaded runtime LIB version(/MT). Cheers -- modified at 6:03 Thursday 12th April, 2007

      1 Reply Last reply
      0
      Reply
      • Reply as topic
      Log in to reply
      • Oldest to Newest
      • Newest to Oldest
      • Most Votes


      • Login

      • Don't have an account? Register

      • Login or register to search.
      • First post
        Last post
      0
      • Categories
      • Recent
      • Tags
      • Popular
      • World
      • Users
      • Groups