Code::Blocks Forums

User forums => General (but related to Code::Blocks) => Topic started by: n-josh on November 10, 2010, 12:37:41 pm

Title: Creating Executables ?
Post by: n-josh on November 10, 2010, 12:37:41 pm
i was wondering if, after you finish writing a program in codeblocks, you can create an executable version that can run independent of codeblocks ?
if it's possible, could someone please explain how ?
thanks ...
Title: Re: Creating Executables ?
Post by: Pecan on November 10, 2010, 01:23:04 pm
The executables are created by your compiler and are, in fact, already independent of the CB IDE.

To execute your GUI program, navigate to the program with your OS file explorer and double click on the executables' name.

If the executable is a console program, open a console, navigate to the home directory of the executable and type in the executables' name.
Title: Re: Creating Executables ?
Post by: n-josh on November 10, 2010, 01:34:54 pm
actually, i've created an sdl program with c, using codeblocks. the only executable i can find is in the "bin" folder of my project and it closes immediately when i open it...
Title: Re: Creating Executables ?
Post by: evilnecrosis on November 10, 2010, 02:21:35 pm
Have you put the sdl dll files in the same folder as your executable or the windows path?
Title: Re: Creating Executables ?
Post by: n-josh on November 10, 2010, 02:33:28 pm
i have a copy of the sdl dll in c:\windows as well as in the same folder as the executable...

it still wont run without opening it in codeblocks and then compiling it
Title: Re: Creating Executables ?
Post by: xunxun on November 11, 2010, 04:48:09 pm
i have a copy of the sdl dll in c:\windows as well as in the same folder as the executable...

it still wont run without opening it in codeblocks and then compiling it

You can use Dependency Walker (http://www.dependencywalker.com/) to watch which dlls your exes depend on.