News:

Accounts with zero posts and zero activity during the last months will be deleted periodically to fight SPAM!

Main Menu

Pass command line argument after build and exec

Started by drev, December 10, 2007, 08:56:45 PM

Previous topic - Next topic

drev

Hello,
Is it possible to specify some argument to pass at a console project
directly in code::block (currently, I must do it via Dos or xterm...)

thanks

thomas

"We should forget about small efficiencies, say about 97% of the time: Premature quotation is the root of public humiliation."

drev


Seronis

I do a lot of console app projects myself and recent had a feature request that ended up being doable with the tools menu.  Basically I requested that there be a toolbar button that would launch a console window whose working directory was already set to the current Targets build directory.  The way i was instructed to do this was:

"Tools" menu -> "Configure Tools..."

'User Defined Tools' dialog appears

click "Add" button

'Edit Tools' dialog appears.  Choose a name for your custom tool you like (I chose 'Launch Console'), executable was cmd.exe and the variable you need to use in the 'Working Directory' field of the edit tools dialog is:

${TARGET_OUTPUT_DIR}

After that I assigned the menu to my F10 key (it wasnt already assigned) and it does all i need.  Plus doing this, you dont have to traverse to the project settings to repeatedly change the default command line arguments when you need to test different options.  It just dumps you to the directory you need (based on your build target).