Code::Blocks Forums
User forums => Using Code::Blocks => Topic started by: fuzzymonkey on November 17, 2010, 04:55:04 pm
-
I have a project that reads in a file supplied by command line arguments. for testing purposes, it is the first argument (argv[1]). I tried to add the name of the file by going Projects->set programs' arguments-> and just typing in the name of the file under Programs arguments (for both the release version and the debug). However, my program always terminates after checking for the existence of the file passed from command line, meaning it was never passed in. If I execute my program from command line and manually add the file name, it works fine, it just does not work when I do it in codeblocks.
Any ideas?
-
Have you tried "Project -> Set program's arguments" ?
-
Sorry to be an ass, but..... Did you even read my post? Specifically the second sentence when I said exactly that....
-
OK, Sorry, I've not read it fully...
This feature works, so you have to debug it yourself, using the debugger...
Put a breakpoint in the beginning of main and step from there...
Probably the working directory is not the one you're expecting.