I have written several C++ programs with MicroSoft Visual C++ 2010 Express. I would like to be able to run them on other computers that do not have Visual C++ Express installed. How can I make these programs portable?
I have written several C++ programs with MicroSoft Visual C++ 2010 Express. I would like to be able to run them on other computers that do not have Visual C++ Express installed. How can I make these programs portable?
I want to compile and make an executable program on a computer with Visual C++ 2010 Express and be able to move this executable file to another computer that does not have VC++ Express installed.
Either use static linking (so there are no dependencies on DLL) or have them get the DLL.
You do realize, of course, that you are making Windows native executables... they will run on any Windows computer. You do not have to be inside VC++ to run them.
Also take tabstop's advice and compile with static linking...
(Surprisingly I ran into this with a friend who's working with Pelles C... He wrote several nice proggys but didn't realize he could run them either from the command line or clicking with the mouse.)
Doesn't work how?
Edit:
Oh look what a quick google found: http://forums.wxwidgets.org/viewtopic.php?f=23&t=30639
Last edited by Shakti; 08-01-2011 at 10:57 AM.
We try starting the program from Windows Explorer and get this message:
Application has failed to start because MSVCP100D.dll wat not found
I have tried static linking and get the same message. I will have them download the dll and try tomorrow morning.
Thanks,
Compile in release mode instead of debug. Debug DLLs are not included in the downloadable runtime.
Depending on what type of project, in addition to the Visual Studio run-time redistributable, the target machine may also need to ensure they have the .NET run-time installed as well.
"Owners of dogs will have noticed that, if you provide them with food and water and shelter and affection, they will think you are god. Whereas owners of cats are compelled to realize that, if you provide them with food and water and shelter and affection, they draw the conclusion that they are gods."
-Christopher Hitchens
My homepage
Advice: Take only as directed - If symptoms persist, please see your debugger
Linus Torvalds: "But it clearly is the only right way. The fact that everybody else does it some other way only means that they are wrong"
When I build it as a release program as suggested it gets a compile error.
1>------ Build started: Project: Lesson2, Configuration: Release Win32 ------
1>cl : Command line error D8016: '/clr' and '/MT' command-line options are incompatible
========== Build: 0 succeeded, 1 failed, 0 up-to-date, 0 skipped ==========