Click here to Skip to main content
15,891,863 members
Please Sign up or sign in to vote.
0.00/5 (No votes)
See more:
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
Comments
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 (www.dependencywalker.com) to check?
[no name] 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)
{
MessageBox(NULL,TEXT("Hello"),TEXT("Hello"),MB_OK);
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.
[no name] 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.

1 solution

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[^].
 
Share this answer
 
Comments
[no name] 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)



CodeProject, 20 Bay Street, 11th Floor Toronto, Ontario, Canada M5J 2N8 +1 (416) 849-8900