Re: Problems with addition of the resource
Re: Problems with addition of the resource
- Subject: Re: Problems with addition of the resource
- From: Steve Wart <email@hidden>
- Date: Sat, 28 Feb 2009 15:57:16 -0800
Also make sure your app starts up in a different directory from where you have your data files. If this is a resource you can do something like this to keep from worrying about absolute path names:
NSBundle *appBundle = [NSBundle mainBundle];
NSString *nspath = [appBundle pathForResource:@"image" ofType:@"bmp"];
char *cpath = [nspath cStringUsingEncoding:NSASCIIStringEncoding];
fopen(fp, cpath, "r");
Steve
On Sat, Feb 28, 2009 at 3:34 PM, Luke the Hiesterman
<email@hidden> wrote:
Not an Xcode issue, but I'd look up the error code and verify permissions on the file.
Luke
Hello,
I create a project, add GLUT and OpenGL frameworks, but I can't load an image using by fopen( fp, "data/image.bmp", "r" ); in fact the image is in 'date', but function shows error message: printf( "fopen can not open the file"). Under Linux that works. Have you got any ideas?
best regards
Ariel
PS: sorry for my English
_______________________________________________
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
_______________________________________________
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
_______________________________________________
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