Click here to Skip to main content
Rate this: bad
good
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
Comments
Maximilien at 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 at 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?
Rasool Ahmed at 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 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 at 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 at 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 at 24-Jan-13 12:10pm
   
Now I remember, its called "msvcr100.dll"

1 solution

Rate this: bad
good
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[^].
  Permalink  
Comments
Rasool Ahmed at 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
Your Filters
Interested
Ignored
     
0 Sergey Alexandrovich Kryukov 397
1 OriginalGriff 350
2 thatraja 205
3 Emre Ataseven 165
4 Shai Vashdi 150
0 Sergey Alexandrovich Kryukov 8,894
1 OriginalGriff 5,200
2 Peter Leow 3,955
3 Maciej Los 3,535
4 Abhinav S 3,208


Advertise | Privacy | Mobile
Web04 | 2.8.140415.2 | Last Updated 23 Jan 2013
Copyright © CodeProject, 1999-2014
All Rights Reserved. Terms of Use
Layout: fixed | fluid