C ++ application compiled with VS2008 does not work on another computer

I created a wn32 project with Visual Studio 2008 and Visual C ++ , it uses the ws2_32.lib library, and then compiled in release mode .

It works very well on one computer, but when I copy the exe file to another computer (which Visual Studio did not install), it does not start.

The message I see is:

This application failed to start because the application configuration is incorrect. Reinstalling the application may fix this problem.

But, if I compile my application using DEV C ++ , it generates a larger executable (738 KB) compared to the Visual Studio 2008 executable (9.5 KB). However, the DEV C ++ executable works on another computer.

I am adding the ws2_32.lib library to the linker properties of my project in the Additional Dependencies box .

How can I fix this to work with Visual Studio 2008?

My code is as follows: http://www.stan.com.mx/yupi/udpserver.cpp

+3
source share
4 answers

JaredPar. , VS2008, , DEV ++ , , , .

, win32, ( / ), , CRT VS2008 ( ). VS2008, , VS2005, , , .

  • ( , "" )
  • " ", "C/++", " "
  • " " DLL , , " (/MTd) " Multi-threaded (/MT)"

, . , , .

+1

, ​​ 9 ++ CRT.

CRT VS2008 . , CRT.

, XCOPY, .

http://msdn.microsoft.com/en-us/library/ms235291.aspx

+11

Perhaps you are missing the external dependency required by your program. Check your project settings to see if you, for example, are communicating with MFC dynamically. You can also run the Depends utility to check for missing dependencies.

+1
source

Source: https://habr.com/ru/post/1706242/


All Articles