Tek-Tips is the largest IT community on the Internet today!

Members share and learn making Tek-Tips Forums the best source of peer-reviewed technical information on the Internet!

  • Congratulations Mike Lewis on being selected by the Tek-Tips community for having the most helpful posts in the forums last week. Way to Go!

thread settings in visual studio

Status
Not open for further replies.

wduty

Programmer
Jun 24, 2000
271
US
In Visual Studio

Project Settings -> c/c++ -> Code-Generation -> Use run-time library

has three options: "SingleThreaded", "Multithreaded", "Multithreaded DLL", (and these again for debug).

Should I set this to "Multithreaded "if I'm using CRT functions like (strcpy, fopen, etc.) inside a thread? Is there a difference between whether I'm using CreateThread() threads vs _beginthreadex() threads?

I've never set this myself (which means it's always been set to "SingleThreaded" by default) but what is the official procedure?
 
The multithread setting causes the "threadsafe" multi-threaded libraries to be used. You won't always run into trouble, but using the right libraries can help prevent obscure errors that are difficult to track down.
 
Status
Not open for further replies.

Part and Inventory Search

Sponsor

Back
Top