Click here to Skip to main content
12,547,616 members (56,879 online)
Rate this:
Please Sign up or sign in to vote.
See more: C++
hello guyes,
I used to program win32 in VC++ 6.0 because its native and no more dll file required to install in the pc in order to work.
And I decided to try to work in earlier versions like VC++ 2010. But the problem is when I build my program and run the .exe file alone with windows 7 or xp that just installed in the pc, an error messages occured (like: some dll file missed from my computer and I have to installed in order to work).
These errors didn't showed up when buileded in VC++ 6.0.

So, How can I make VC++ 2010 debugger or compiler works like VC++ 6.0?
Posted 23-Jan-13 9:36am
Maximilien 23-Jan-13 15:41pm
Why would you want to still use an antiquated compiler ? Fix your code.
You should link your application statically to not have to depend on DLL; if that is not possible then you need to install runtimes on target machines.
Marius Bancila 23-Jan-13 16:05pm
First of all, tell exactly what error you have. How else can you give any relevant suggestions? Perhaps is something your applications depends upon and is not available on that machine. Did you use depends.exe ( to check?
Rasool Ahmed 24-Jan-13 0:45am
When I run my program a message error happened tells me that I must have a some dll file (I forgot its name) and reinstall my program. And my program is just simple this is the code:
#include <windows.h>

int APIENTRY _tWinMain(HINSTANCE hInstance,
HINSTANCE hPrevInstance,
LPTSTR lpCmdLine,
int nCmdShow)
return 0;
this program works in VC++ 6.0 but not on 2010
Marius Bancila 24-Jan-13 2:48am
Well, I guess you are running that executable on another machine. In this case you miss the DLLs for CRT. You have two options, either statically link or install the VC++ re-distributables (must match exactly your version of VC++ including service pack) on the target machine.

And next time make sure you remember the exact name of the DLL, otherwise has no point in asking.
Rasool Ahmed 24-Jan-13 11:38am
dll name is related to like this name: "mvrc100.dll" or something like that. It may be one of CRT files, like CPallini said in his solution.
Rasool Ahmed 24-Jan-13 12:10pm
Now I remember, its called "msvcr100.dll"

1 solution

Rate this: bad
Please Sign up or sign in to vote.

Solution 2

This happens because Visual Studio 6, by default (if I remember well) links statically with the CRT, while Visual Studio 2010 by default links dynamically with it.
As already suggested by Maximilien, link statically your application with the CRT or, better, link it dynamically (don't change the default) and redistribute together with your executable the required DLLs[^].
Rasool Ahmed 24-Jan-13 0:45am
How can I make it links statically with the CRT??

This content, along with any associated source code and files, is licensed under The Code Project Open License (CPOL)

  Print Answers RSS
Top Experts
Last 24hrsThis month

Advertise | Privacy | Mobile
Web02 | 2.8.161018.1 | Last Updated 23 Jan 2013
Copyright © CodeProject, 1999-2016
All Rights Reserved. Terms of Service
Layout: fixed | fluid

CodeProject, 503-250 Ferrand Drive Toronto Ontario, M3C 3G8 Canada +1 416-849-8900 x 100