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. Single-threaded versus Multithreaded

Single-threaded versus Multithreaded

Scheduled Pinned Locked Moved C / C++ / MFC
questionannouncementdebugginghelpworkspace
3 Posts 3 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.
  • R Offline
    R Offline
    Ramsus
    wrote on last edited by
    #1

    Hi everyone, I am busy creating a little setup project and run into a problem when compiling the debug version into a release version. (LNK4098 linker warning) My question is what is the difference between Single-threaded and Multithreaded CRT options in the compiler and when do I choose which one ? (My project do spawn a second thread apart from the main running thread.) Regards Ramsus Carpe Deum

    R A 2 Replies Last reply
    0
    • R Ramsus

      Hi everyone, I am busy creating a little setup project and run into a problem when compiling the debug version into a release version. (LNK4098 linker warning) My question is what is the difference between Single-threaded and Multithreaded CRT options in the compiler and when do I choose which one ? (My project do spawn a second thread apart from the main running thread.) Regards Ramsus Carpe Deum

      R Offline
      R Offline
      Ryan Binns
      wrote on last edited by
      #2

      If you're using the CRT from multiple threads, use the multithreaded version. If not, the singlethreaded version is smaller and slightly quicker.

      Ryan

      "Punctuality is only a virtue for those who aren't smart enough to think of good excuses for being late" John Nichol "Point Of Impact"

      1 Reply Last reply
      0
      • R Ramsus

        Hi everyone, I am busy creating a little setup project and run into a problem when compiling the debug version into a release version. (LNK4098 linker warning) My question is what is the difference between Single-threaded and Multithreaded CRT options in the compiler and when do I choose which one ? (My project do spawn a second thread apart from the main running thread.) Regards Ramsus Carpe Deum

        A Offline
        A Offline
        Andrew Walker
        wrote on last edited by
        #3

        It depends... Ryan gave a good answer, in ideal [single threaded] circumstances you should choose to use the single threaded crt libraries. rules of thumb * If there is any chance that in the future any part of the project may be multithreaded I recommend setting the options for the project to use the multi-threaded libraries. From past experience, it's easier to tell everyone else on the team what the setting should be rather than trying to let them figure it out (or change it) on their own. * If any of your dependancies are distributed as binaries linked against a particular crt, you MUST link against the same type. * If you don't want to distribute any .dll's with you product, statically link to the crt.


        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