Re: Problem with carbon app and debugger
Re: Problem with carbon app and debugger
- Subject: Re: Problem with carbon app and debugger
- From: Eric Gorouben <email@hidden>
- Date: Tue, 9 Dec 2008 21:05:06 +0100
Thanks for the replies.
Yes, using CFBundle was the way I solved it. But the fact that te
debugger used the bundle's directory as working directory confused me.
Eric
Le 9 déc. 08 à 14:21, Jonas Maebe a écrit :
On 09 Dec 2008, at 14:10, Eric Gorouben wrote:
after tracing, it looks like a fopen failed.
The path is relative, unix format (simply "folder/myFile.dat",
"folder" containing "myFile.dat" as expected and being in the same
directory as the app)
fopen works when I'm in the debugger, and sends back a null pointer
when I open the app directly.
I suppose that in the debugger, the base address is the bundle
address, and when executing directly, it's the binary executable
address.
I solved the problem by providing absolute paths.
Is this behavior normal?
You cannot depend on a particular current working directory after
starting a Carbon app, and the working directory can indeed be
different when running inside or outside the debugger.
See http://developer.apple.com/documentation/CoreFoundation/Conceptual/CFBundles/Tasks/locating.html
for how to get the path to your application bundle.
Jonas
_______________________________________________
Do not post admin requests to the list. They will be ignored.
Xcode-users mailing list (email@hidden)
Help/Unsubscribe/Update your Subscription:
@gmail.com
This email sent to email@hidden
_______________________________________________
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