On Feb 8, 2007, at 5:30 PM, Theodore H. Smith wrote:
I'm compiling some small shell tool.
It doesn't use any library functions except fopen (and fread and fclose), and malloc and free.
However, I'm seeing some really odd thing. The tool runs differently when run from the terminal and when debugged inside Xcode!
What's worse, it's causing a bug that only shows up in the terminal.
It's the same file. I'm not talking about release vs debug build, but the debug build actually run from the terminal. So I do this:
rexaf-t3% /Users/theodore/Programming/ElfData/Source/build/debug/ewasd
When you do this, your working directory is your home directory. When you run or debug in Xcode, the default working directory is the Build directory (/Users/theodore/Programming/ElfData/Source/build/debug/). Your code is probably written to assume some resources relative to the current working directory. Don't.