Author Topic: Creating Executables ?  (Read 14105 times)

Offline n-josh

  • Single posting newcomer
  • *
  • Posts: 3
Creating Executables ?
« 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 ...

Offline Pecan

  • Plugin developer
  • Lives here!
  • ****
  • Posts: 2773
Re: Creating Executables ?
« Reply #1 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.

Offline n-josh

  • Single posting newcomer
  • *
  • Posts: 3
Re: Creating Executables ?
« Reply #2 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...

evilnecrosis

  • Guest
Re: Creating Executables ?
« Reply #3 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?

Offline n-josh

  • Single posting newcomer
  • *
  • Posts: 3
Re: Creating Executables ?
« Reply #4 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

Offline xunxun

  • Almost regular
  • **
  • Posts: 187
Re: Creating Executables ?
« Reply #5 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.
Regards,
xunxun