Jump to content
  • Advertisement
Sign in to follow this  
ixuz

visual studio 2005

This topic is 3218 days old which is more than the 365 day threshold we allow for new replies. Please post a new topic.

If you intended to correct an error in the post then please contact us.

Recommended Posts

#include <iostream> #include <winsock.h> using namespace std; int main() { SOCKET lol; cout << "lolz\n"; system("PAUSE"); return 0; } It works well on my computer but on my friends computer the program crashes. The following error occurs: This program could not start because the application configuration is incorrect. The problem may be corrected to if you reinstall the program. (translated from swedish to english) Very strange, please help :D thx!

Share this post


Link to post
Share on other sites
Advertisement
Your friend probably needs to install the "Visual C++ 2005 Redistributable Package"

I'm not sure if you need SP1, SP2, etc though. Try them newest-to-oldest until it works.

Share this post


Link to post
Share on other sites
Hi, my friend installed the "Visual C++ 2005 Redistributable Package" but no success. The program still crashes for him, we've also checked which service pack version he have, SP3 for XP is the service pack he uses.

Do you have any other tips or something to point me in the right direction? thanks :P

Share this post


Link to post
Share on other sites
Did you actually use Visual Studio 2005? Not 2005 SP1 or 2008 or 2008 SP1...

Or just avoid the mess altogether, and link with static library instead of dll (the /MT switches, I think).

Share this post


Link to post
Share on other sites
I compiled the project with visual studio 2005 Professional Edition Version 8.0.50727.42 (RTM.050727-4200). Microsoft Visual Studio tell me I'm using Microsoft .NET Framwork Version 2.0.50727 SP2.

I used the link I've got from one of the earlier posts in this thread to install the redistributable packet, well I noticed that it was for 2008 but I didn't really think it would matter.

I did change from Multi-Threaded DLL (/MD) to Multi-Threaded (/MT), it didn't solve the problem thou.

These are my servicepacks installed:
Microsoft .Net Framework 1.0 SP3 Developer
Microsoft .Net Framework 2.0
Microsoft .Net Framework 3.5 SP1

My friend have these installed. I have them too.
Microsoft Visual C++ 2005 Redistributable
Microsoft Visual C++ 2008 Redistributable

Does my servicepack version change the outcome of the compile?
Should I patch my visual studio version?

Thanks for your help :)

[Edited by - ixuz on August 19, 2009 10:05:00 AM]

Share this post


Link to post
Share on other sites
There are service packs for Visual Studio, in addition to service packs for XP/Vista...

Your best bet is to create a deployment project (Setup Wizard) from within Visual Studio, and have your friend run the installer (he needs both the EXE and the MSI, because the EXE bootstraps dependencies). Also note that your application likely needs a manifest, which may or may not be automatically included for you depending on how you created the project.

To diagnose exactly what is missing, you can have your friend download the Dependency Walker, open your EXE, and look for DLLs marked yellow in the tree view on the left, and/or symbols marked red in the symbol list view.
www.dependencywalker.com.

Finally, the latest version of Visual Studio is 2008 SP1. If you're still using 2005, you're soon five years out of date (2010 is coming out soon).

Share this post


Link to post
Share on other sites
Okay, I'll try this, so you think I should quit using the visual studio 2005 and go for the visual studio 2008 until the 2010 is here? Will my problem still occur if I switch to visual studio 2008?

I would like to ask you, what is a manifest and what is it good for?

thanks

Share this post


Link to post
Share on other sites
Quote:
Original post by ixuz

I would like to ask you, what is a manifest and what is it good for?

thanks


A manifest is Microsoft's way of making it practically IMPOSSIBLE to distribute a project in the same way that you could with any VC compiler pre-2003. Basically there is a folder in the windows directory (WinSxS) holding various versions of runtimes required for most applications compiled with the C libraries (and probably .net, etc). I think it was supposed to make things like backward compatibility easy, as well as provide a common location for all runtimes for all versions of everything without each version having to distribute the files specific to the version of the compiler that was used to make it. In reality, it's just an extra hurdle, where you either link statically, include the manifest and runtimes in the installation directory and insert a custom manifest in your exe so it knows to use the local copies, or install the c runtimes on any machine you want to run the software on.

What it's good for? In reality, so far I have seen no benifits - only hinderences.

Share this post


Link to post
Share on other sites
Okay thank you for your reply, so I'll have to link a static library by linking a manifest and have the runtime dll's and such in order to make my program work without having to install the runtime files in the machine this program will run on.

What will I need to make my winsock2 project have a static library?
If you have any tips on how to link the manifest and get the correct files please tell me, thank you very much for the help.

// ixuz

Share this post


Link to post
Share on other sites
Sign in to follow this  

  • Advertisement
×

Important Information

By using GameDev.net, you agree to our community Guidelines, Terms of Use, and Privacy Policy.

Participate in the game development conversation and more when you create an account on GameDev.net!

Sign me up!