How to export a program

Well i just finished my new program in c++ that i learned from c++ for dummies and i would like to know how i can like export it to my desktop. I made this program in code blocks
Last edited on
There isn't really anything to export. Once you build the program in C::B it will make an .exe file. Just find that .exe file on your computer and copy it to wherever you want. It will be in the project folder you specified when you created the project (or one of its subfolders).


Note that there are typically 2 different versions of the program: the "debug" build and the "release" build. Debug builds are bloated and slow because they're unoptimized and contain a bunch of extra crap that C::B uses for helping you debug the program. "Release" builds are trimmed and so they are better for handing out to other people.

You should never distribute debug builds. If you want to give this program to someone else to try, give them a Release build.

In C::B, on the toolbar, there should be a drop-box that says "Debug" on it. Click on that, switch it to Release, and then rebuild. Once you do that it'll create the Release build.
Last edited on
You compile a program, you don't really export it.

When you compile a program, it generates an executable. If you're in windows it would be a .exe file.

Right click on your source file's tab at the top of code-blocks and select "Open containing folder". You will probably see a folder names "Debug" or "Release" or both. Open one of those and you will find your exe there. Right click, select "Send To..." and select "Desktop (Create shortcut)". You can now run the program from your desktop.
Topic archived. No new replies allowed.