Author Topic: Set program's arguments (cmd line arg passing to target) not working in 10.05  (Read 6065 times)

Offline ppanish

  • Single posting newcomer
  • *
  • Posts: 4
I just downloaded/built/installed the stock release (10.05 rev 6282) on Ubuntu Linux 11.10, and I've been unable to pass command line arguments to the target (debug or release doesn't matter). I've set this up using the "Project->Set program's arguments" for both Debug and Release with the box checked for the target providing the main executable. I've read the posts in the Forum without enlightenment. I'm not clear on whether the arguments are supposed to be passed alone, or whether a host application path is needed as a prefix, but I've tried all combinations I could think of without success.

The Build Log Window (which also seems to display the execution log) doesn't show any arguments being passed:

Checking for existence: /home/ppanish/coding/cmdlineargs/cmdline/bin/Debug/cmdline
Executing: xterm -T cmdline -e /usr/local/bin/cb_console_runner LD_LIBRARY_PATH=$LD_LIBRARY_PATH:. /home/ppanish/coding/cmdlineargs/cmdline/bin/Debug/cmdline  (in /home/ppanish/coding/cmdlineargs/cmdline/.)
Process terminated with status 0 (0 minutes, 31 seconds)


Code
#include <iostream>
using namespace std;

int main(int argc, char* argv[]) {
  cout << "argc = " << argc << endl;
  for(int i = 0; i < argc; i++)
    cout << "argv[" << i << "] = "
         << argv[i] << endl;
}

Any help or advice on how to debug this problem would be appreciated.
 

 

Offline oBFusCATed

  • Developer
  • Lives here!
  • *****
  • Posts: 13406
    • Travis build status
If possible try a nightly build. See the nightly build sub forum for details.
It works as expected here.
(most of the time I ignore long posts)
[strangers don't send me private messages, I'll ignore them; post a topic in the forum, but first read the rules!]

Offline ppanish

  • Single posting newcomer
  • *
  • Posts: 4
Thanks, I loaded the trunk rather than the nightly, not sure what difference that will make. It took me a while to install SVN and the necessary libraries, but once that was done it build without problems and took care of my problem.

Much appreciated, I'm looking forward to using this, it looks like an excellent tool.

Offline oBFusCATed

  • Developer
  • Lives here!
  • *****
  • Posts: 13406
    • Travis build status
In fact we have prebuild packages for the nightlies, which are compatible with ubuntu as far as I know
(most of the time I ignore long posts)
[strangers don't send me private messages, I'll ignore them; post a topic in the forum, but first read the rules!]