I compiled a simple Hello World console app, and I would like it to run on other computers without the compiler installed. Do you know what setting to have all the microsuck libraries linked in, so I can run this elsewhere, or is there another way to compile on one machine and run on another?
Thanks!
Copyright © 2024 Q2A.ES - All rights reserved.
Answers & Comments
Verified answer
First change the project target to Release, you're not permitted to distribute Debug builds.
Next you need to change to project settings, right click the project and select properties. Navigate to Configuration Properties -> C/C++ -> Code Generation and change Runtime library from Multi-threaded DLL to plane Multi-threaded.
Now when you buid the .EXE will only depend on standard Windows APIs.
Our company deploys c/++ and java applications across many platforms; a frequent customer support issue is that the customer doesnt have the microsoft "runtime" installed, required to run these MSVC applications. It's a free download, but your clients/customers/grandmother will have to understand this when installing your software.... This is sort of comparable to running java app's, whereby you need java first installed to run the application. Though, if both "native" app's and java app's require a "runtime", then that is a really strong argument to just code the thing in java in the first place....
You should be able to Build an executable, which will be located in your project directory in a folder called either Debug or Release. Look for <project name>.exe.
I haven't used Express - I use the Enterprise edition at work, but I'll bet it's the same.
For simple programs like this one there won't be any need for additional libraries. All the necessary references to run-time dll's will be done by the compiler, which links the necessary libraries as part of it's normal operation.