• Open Menu Close Menu
  • Apple
  • Shopping Bag
  • Apple
  • Mac
  • iPad
  • iPhone
  • Watch
  • TV
  • Music
  • Support
  • Search apple.com
  • Shopping Bag

Lists

Open Menu Close Menu
  • Terms and Conditions
  • Lists hosted on this site
  • Email the Postmaster
  • Tips for posting to public mailing lists
Re: Compile acts differently when run from terminal and in debugger???
[Date Prev][Date Next][Thread Prev][Thread Next][Date Index][Thread Index]

Re: Compile acts differently when run from terminal and in debugger???


  • Subject: Re: Compile acts differently when run from terminal and in debugger???
  • From: Chris Espinosa <email@hidden>
  • Date: Fri, 9 Feb 2007 11:13:30 -0800


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.

Chris
 _______________________________________________
Do not post admin requests to the list. They will be ignored.
Xcode-users mailing list      (email@hidden)
Help/Unsubscribe/Update your Subscription:

This email sent to email@hidden

  • Follow-Ups:
    • Re: Compile acts differently when run from terminal and in debugger???
      • From: "Theodore H. Smith" <email@hidden>
References: 
 >Compile acts differently when run from terminal and in debugger??? (From: "Theodore H. Smith" <email@hidden>)

  • Prev by Date: Re: Strange behavior in XCode, not exhibited in Dev-C++
  • Next by Date: Re: Not Hitting Breakpoints in Reloaded Shared Library
  • Previous by thread: Re: Compile acts differently when run from terminal and in debugger???
  • Next by thread: Re: Compile acts differently when run from terminal and in debugger???
  • Index(es):
    • Date
    • Thread