Creating a usable Executable on another computer

Feb 17, 2011 at 8:54am
Hi,

I just recently learned that an executable file is created simply by building my c++ program in either debug/release mode. I am using visual studio. My program consist of a GUI created by the Windows Forms Application project type.

The executable works great on my computer (the GUI displays perfectly fine and it is functional). However, when I run this executable on another machine, it crashes and nothing shows up. I even installed the .NET 4 framework on the target computer, but there was no luck.

How do I build my application so that it couples the necessary library files with my executable into the same directory? Do I have to do this manually? If so, how do I know which library it would need?

I also have the same problem with a C++ GUI made with QT on Net Beans. I'm not sure how to get it running on a target machine. It works fine (opens fine) on my computer, but it doesn't open at all on the target machine. I tried putting all of the .dll QT Bin files into the same directory as the executable, and it still did not work. Am I missing something?

Thank you
Last edited on Feb 17, 2011 at 8:59am
Feb 17, 2011 at 9:26am
Maybe you just need to install Microsioft Visual C++ 20xx Runtime library on the other computer? This includes the release DLLs for the C++ library, the MFC library,...

If you don't want to have to install that, you have to change your build options so those are statically linked in your program.
Feb 17, 2011 at 10:21am
Make a deployment project to install the code onto another computer. This will install all other dependencies.
Feb 17, 2011 at 11:03pm
bartoli - thank you. I prefer to have the libraries statically linked in the program. I can't seem to find that option... could you tell me where it would be in the build options?

krishnendu - thank you. That is an interesting option! I just learned something new today :) Except, I still don't know which library files will allow my executable to run on the target computer. I tried putting a bunch of .dll's in the same folder as the executable, but it still doesn't open.
Topic archived. No new replies allowed.