Code::Blocks
July 29, 2010, 05:59:22 pm *
Welcome, Guest. Please login or register.
Did you miss your activation email?

Login with username, password and session length
News: New release 10.05 is ready. Grab it while it's hot!!!
 
   Home   Help Search Login Register  :: WebsiteWiki  
Pages: [1]
  Send this topic  |  Print  
Author Topic: Code::Blocks Executable Does Nothing  (Read 352 times)
Alterah
Newcomer
*
Posts: 3


« on: February 12, 2010, 07:00:59 pm »

Hello,

I have searched the forums, but couldn't find a solution to this problem. I have a C++ project that has three files. I've made it a console project in Code::Blocks. It requires a file for input (which may be my problem) However, when I double click the executable (which is a release executable, not a debug one) it pulls up the console very briefly then closes. This isn't a problem of it outputting the results too quickly as my program requires user input. I've also tried running it via the command line, nothing happened. I am new to projects in Code::Blocks, so does my input file for the program need to be in the same folder as my executable? Thanks for your time and help.

Logged
jens
Global Moderator
Lives here!
*****
Posts: 2975



WWW
« Reply #1 on: February 12, 2010, 07:12:36 pm »

If you right click your project in the manager pane and chose "Properties -> Build targets", you can see (and change) the execution working dir for your targets.
The path is relative to the projects root-dir (if it is not an absolute-path).

Where to put your input file is something nobody here can answer without knowing your program (and asking general programming questions violates our forum rules), but if it should be in the same directory as the executable, put it into the execution working dir.
Logged

Regards

Jens

debian - nightlies and wxWidgets (msw-)cross-build libs for "i386" and "amd64" : http://apt.jenslody.de/
C::B changelog: http://apt.jenslody.de/ChangeLog
Alterah
Newcomer
*
Posts: 3


« Reply #2 on: February 12, 2010, 07:38:51 pm »

Ok thank you. Currently the input file is where the source files and header files are (which when I run within Code:Blocks it picks up the file just fine). I don't know if that bit of information goes against the rules, if so, don't answer it. Thanks for the other bit of info though.
Logged
Pages: [1]
  Send this topic  |  Print  
 
Jump to:  

Powered by MySQL Powered by PHP Powered by SMF 1.1.11 | SMF © 2006-2009, Simple Machines LLC Valid XHTML 1.0! Valid CSS!