Command Line args in C program using Netbeans

Basmah picture Basmah · Apr 3, 2012 · Viewed 8.2k times · Source

I am new to usintg Netbeans in Linux. So, I am facing problem how to specify command line args for example A.txt and B.txt for my program in C using Netbeans. Its pretty simple to pass them as args using command line , but now for debugging purpose i need to use Netbeans 7.1 On Ubuntu version 11. Any help would be highly appreciated. Thanks.

Answer

mnajera picture mnajera · May 3, 2012

Specifying command line arguments seems to have changed since netbeans 6.9 (I just checked). To do this in 7.1, you have to go into Project Properties > Run > Run Command to set the arguments.

For example, to set the arguments -foo -bar, the Run Command setting would read:

"${OUTPUT_PATH}" -foo -bar