Compiling problem lesson 8

The Partridge Family were neither partridges nor a family. Discuss.
Post Reply
ErnestPL
Posts: 1
Joined: July 17th, 2014, 9:22 pm

Compiling problem lesson 8

Post by ErnestPL » July 17th, 2014, 9:43 pm

Hi,

I have weird problem with compiling my program. I finished beginner c++ tutorial lesson 8. The problem is, when i launch the poop game on my pc it work's well, but when i try to run it on the other computer i have error " missing msvcr120.dll " or "program failed to launch". What should I do to fix this? I looked on this forum and other sites too but it was pointless. I think there is a way to include those dlls in exe by changing the runtime library in code generation properties to multi-threaded (/mt) but it didn't fix the problem as well.

And by the way I would thank to Chili for great tutorials for noobies like Me :lol:

MagicFlyingGoat
Posts: 20
Joined: April 17th, 2014, 4:13 am

Re: Compiling problem lesson 8

Post by MagicFlyingGoat » July 17th, 2014, 10:42 pm

Someone correct me if im wrong but i believe that this problem occurs when you haven't downloaded the directX SDK. Have you got the directX SDK on your other computer?

stagephrite
Posts: 5
Joined: June 20th, 2014, 1:53 pm

Re: Compiling problem lesson 8

Post by stagephrite » July 18th, 2014, 4:12 am

This is because you don't have microsoft visual c++ 2012 redistributable installed on the machine where you get the error. So you can either download and install that or find the folder where msvcr120.dll is located on the computer with visual studio installed and copy all the dll's in that folder into the same folder as the .exe you are trying to run(to be honest I can't remember off the top of my head if you actually need them all or just msvcr120 so maybe you could experiment and let us know lol)

User avatar
LuisR14
Posts: 1248
Joined: May 23rd, 2013, 3:52 pm
Location: USA
Contact:

Re: Compiling problem lesson 8

Post by LuisR14 » July 18th, 2014, 11:18 am

pretty much you need msvcrXXX.dll (and depending on what features you use from the STL, msvcpXXX.dll, replace XXX with 100 for vs10, 110 for vs12 and 120 for vs13), so it's not like stagephrite said :P, you'd need the visual c++ 2013 runtime (not the visual c++ 2012 runtime :lol:)
you can find them dlls in Windows\System32 (if app is 64bit and OS is 64bit or app is 32bit and OS is 32bit), and Windows\SysWOW64 (if app is 32bit and OS is 64bit)

and well yes, you can have it statically linked by setting it to Multithreaded (in release mode) in the Compiler->Code Generation page of the properties
always available, always on, about ~10 years c/c++, java[script], win32/directx api, [x]html/css/php/some asp/sql experience. (all self taught)
Knows English, Spanish and Japanese.
[url=irc://irc.freenode.net/#pchili]irc://irc.freenode.net/#pchili[/url] [url=irc://luisr14.no-ip.org/#pchili]alt[/url] -- join up if ever want real-time help or to just chat :mrgreen: --

User avatar
chili
Site Admin
Posts: 3948
Joined: December 31st, 2011, 4:53 pm
Location: Japan
Contact:

Re: Compiling problem lesson 8

Post by chili » July 19th, 2014, 2:13 pm

Changing the linking to static will fix this problem. It's likely that you didn't change the setting properly.
Chili

Post Reply