multi-threaded dll?

Discussion about everything. New games, 3d math, development tips...
Post Reply
Guest

multi-threaded dll?

Post by Guest »

Okay I know that multi-threaded mode in visual studio links to the c runtime libraries through a dll...

and multi-threaded dll mode links the c runtime directly into your app staticly?? right???

because I noticed when I chose multi-threaded, it needed msvc80.dll or something to run...

am I right?

But what I don't understand is the name. I mean if its called multi-threaded dll you would think it means that it puts the c runtime into a dll and makes the app dependent on the dll. but its the other way around. odd.
Guest

Post by Guest »

and what is the runtime settings default settings in visual c++ express?
vitek
Bug Slayer
Posts: 3919
Joined: Mon Jan 16, 2006 10:52 am
Location: Corvallis, OR

Post by vitek »

I think you are probably confused. Multithread is supposed to link agains the static lib and Multithread Dll should link against the dll. Here is the list of runtime library selections and what they map to...
  1. Multithreaded (/MT, release static)
  2. Multithreaded Debug (/MTd, debug static)
  3. Multithreaded Dll (/MD, release dll)
  4. Multithreaded Debug Dll (/MDd, debug dll)
  5. Singlethread (/ML, release static)
  6. Singlethread Debug (/MDd, debug static)
If you have the visual studio tools installed, you can prove the dependencies to yourself...

Code: Select all

C:\>type b.cpp
#include <stdio.h>
int main(void)
{
  return printf("hello world!\n"), 0;
}
C:\>cl /nologo /MT b.cpp
b.cpp

C:\>dumpbin /imports b.exe | find /i "dll"
    KERNEL32.dll

C:\>cl /nologo /MD b.cpp
b.cpp

C:\>dumpbin /imports b.exe | find /i ".dll"
    MSVCR70.dll
    KERNEL32.dll
C:\>
Guest

Post by Guest »

how come in Visual c++ express when I choose multithreaded, it needs the dll...?

and how come when i choose mutithreaded dll, it doesn't need the dll to run...
Guest

Post by Guest »

wait, they both need the dll to run now?!?!?!!?

how do i staticly link all the c runtimes in visual c++ express edition...????
Guest

Post by Guest »

okay, I discovered something interesting. Apparently, you have to have mvsc80.dll to run any application made in visual c++ express. I read on msdn that there is no support for statically linked c runtimes for visual express. which blows. which also means you will have to give people the vc 8 redistributable... which sucks. I'm gonna stick with codeblocks and mingw. Only because I'm more used to it. and so on. but when I learn more about vc express. I may switch back. can anyone prove me wrong about this?
Post Reply