OK, so I'm thinking about the future (of my program). Obviously, eventually, somehow, I want to be able to distribute my game, because there is next to zero value in a game that only plays on one computer, my laptop.

Anyways, here's the problem: I'm using Visual C++ Express to write some C++ code. I hit compile/build, and it runs just splendid on my computer. However, I copy all the binaries/dlls/data in the same directory structure onto a USB drive, and I've tested it on three different computers. What I do is I open the folder for the USB device in Windows Explorer, and double-click "THE_GAME.exe" Every other computer I've tested it on does the same thing:

A pop-up window appears and says "The application has failed to start because its side-by-side configuration is incorrect. Please see the application event log or use the command-line sxstrace.exe tool for more detail"

I'll be honest, I have no idea what I'm doing. All I know is the program works on my computer, and only my computer. I'm using C/C++ and SDL to write a game, all the files are there on the other computers I've tested it on, it just doesn't run...Any ideas???
Make sure the computer you're running it on has the Visual C++ 2010 Redistributable Package for the architecture (x86 or x86-64). That's likely your problem. Without the proper runtime environment package, it won't work.
Ashbad wrote:
Make sure the computer you're running it on has the Visual C++ 2010 Redistributable Package for the architecture (x86 or x86-64). That's likely your problem. Without the proper runtime environment package, it won't work.
And, as a side-note to that (of course), make sure that every computer that will be running your game has that package installed as well and/or that you instruct the users to install it. That sure seems clumsy to me on Microsoft's part, though. Sad
OK, where can the user go to install and/or download this?
buttsfredkin wrote:
OK, where can the user go to install and/or download this?


I hate to be snide, but it's the first Google result for both " Visual C++ 2010 Redistributable Package x86" and " Visual C++ 2010 Redistributable Package x64". You could just give people links to the microsoft/msdn.com downloads.
Don't setup programs install this if you don't have it already? Installer gogogo!
Ah, my bad ashbad. I'll be sure to try and set it up in the installer program eventually.
Alright, I fixed the problem - by switching compilers. Instead of using Visual C++, I'm now using Code::Blocks which works really well.
LincolnB wrote:
Alright, I fixed the problem - by switching compilers. Instead of using Visual C++, I'm now using Code::Blocks which works really well.


You mean, you switched from MSVC compiler to GCC/G++?
Yeah, now I'm using MinGW.
That doesn't "fix" anything, as such. I believe MinGW statically links the C runtime by default, which results in larger executables and potential security problems (if you dynamically link to the C runtime then security issues that are found in the C runtime will get fixed by Windows Update).

You can statically link the C runtimes in Visual Studio, too, though for the reasons above it is dynamically linked by default (see this page on MSDN for more information, and look in your project settings to configure this).

Quote:
That sure seems clumsy to me on Microsoft's part, though. Sad

I'd only agree it's "clumsy" in that they don't distribute the C runtime over Windows Update by default (nor the .NET Framework, for that matter), just fixes.
Just add a setup project to your visual studio solution and it will handle all that for you.
  
Register to Join the Conversation
Have your own thoughts to add to this or any other topic? Want to ask a question, offer a suggestion, share your own programs and projects, upload a file to the file archives, get help with calculator and computer programming, or simply chat with like-minded coders and tech and calculator enthusiasts via the site-wide AJAX SAX widget? Registration for a free Cemetech account only takes a minute.

» Go to Registration page
Page 1 of 1
» All times are UTC - 5 Hours
 
You cannot post new topics in this forum
You cannot reply to topics in this forum
You cannot edit your posts in this forum
You cannot delete your posts in this forum
You cannot vote in polls in this forum

 

Advertisement