cannot run application

Hi, I built a windows consol application and it runs rine on my computer, but when i try to run it on my brothers computer it says

"this program cannot run. please try reinstalling the application"

he is running the same version of windows xp as i am, the only difference is that he doesnt have MS VC++ installed on his computer...

could the program that I am building link to MS VC C++ stuff?

I am hoping for some suggestions on where to look.


Edit..

I found out that my program is linking to some file inside of the MS VC 2008 directory. How do I find out what file that is, or make it so that my program is not dependant on that directory so others who do not have MS VC 2008 can run my propram?
Last edited on
You need to link statically to the C++ library, to do so change this setting:
Project > Properties > Configuration Properties > C/C++ > Code Generation > RunTime Library > Multy threaded (/MT)
Hi,

Sorry for the bump, but I'm trying this too.

When I do the above, I get a lot of errors when compiling, like:
error LNK2005: "public: void __thiscall std::_Container_base_secure::_Orphan_all(void)const " (?_Orphan_all@_Container_base_secure@std@@QBEXXZ) already defined in msvcprtd.lib(MSVCP90D.dll)
error LNK2005: "public: __thiscall std::basic_string<char,struct std::char_traits<char>,class std::allocator<char> >::basic_string<char,struct std::char_traits<char>,class std::allocator<char> >(class std::basic_string<char,struct std::char_traits<char>,class std::allocator<char> > const &)" (??0?$basic_string@DU?$char_traits@D@std@@V?$allocator@D@2@@std@@QAE@ABV01@@Z) already defined in msvcprtd.lib(MSVCP90D.dll)

Is this maybe because mine isn't a console app, but a win32 one? What's wrong here?
When using VC++ start from an Empty Project.
In addition to statically linking, you must make sure that you are running a Release version, for if your brother doesn't have VS installed on his computer, then you cannot run the Debug version.
Last edited on
Topic archived. No new replies allowed.