Jump to content
  • Advertisement
Sign in to follow this  
LordKass

Running c++ application built by MSVC++2005 Express Edition on Another Computer

This topic is 4117 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

My program can't run in my friend's computer which doesn't have visual c++. He told me that the program said incorrect configuration or something. I am using Microsoft Visual C++ 2005 Express Edition (Free One)

Share this post


Link to post
Share on other sites
Advertisement
Compile the program in 'Release' mode.

Your friend probably doesn't have the libraries installed that you use.

Go to -> Properties and then do this:

http://img257.imageshack.us/img257/4530/naamloossh4.jpg

Then recompile your program. You will notice that your program is bigger in size now. Send this program to your friend and it should work!

Good luck!

Share this post


Link to post
Share on other sites
i got this error after compiling

Linking...
MSVCRT.lib(wcrtexew.obj) : error LNK2001: unresolved external symbol _wWinMain@16
..\Visual Studio 2005\Projects\Tic-Tac-Toe\Release\Tic-Tac-Toe.exe : fatal error LNK1120: 1 unresolved externals

Share this post


Link to post
Share on other sites
Well, Vinniee assumed a lot about your program when he offered his advice. We don't know if you have a Console program or a Win32 program or a windows program that uses MFC or ATL. Basically, you probably need to include the Visual C++ runtime library. Read this to find out more about the runtime libraries for c and C++.

In a nutshell, you'll want to look at the table labelled "Standard C++ Library". This lists four different libraries you can use. There are actually only two really different versions, the other two are debug versions for use when trying to debug your program. When giving the program to a friend you should probably just give the non-debug version. The non-debug versions of the library are either dynamically or statically linked. A dynamically linked lilbrary is a .dll file. This kind of file allows you to call functions without it being included directly in your program which decreases the size of your code.

However, not all computers come with this dll file. Which brings us to statically linking code. This will increase your file size by including all of the stuff in that dll file into your program, but it saves you the effort to distribute the dll file. You'll want to locate that option somewhere in the settings (I don't have MSVC++ around at the moment so can't tell you where) and select multithreaded static link non-debug version for release mode and the debub version for debug mode.

lastly, if you wish to use the dll versions you can also just have your friend install this file which should install the files needed.

Hope that helps a little.

Share this post


Link to post
Share on other sites
In project settings head to C/C++->Code Generation then change the Runtime Library to Multi-Threaded(/MT) (itll most likely be Multi-Threaded Debug DLL (/MDd) currently).

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.

We are the game development community.

Whether you are an indie, hobbyist, AAA developer, or just trying to learn, GameDev.net is the place for you to learn, share, and connect with the games industry. Learn more About Us or sign up!

Sign me up!