• 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: Problems with addition of the resource
[Date Prev][Date Next][Thread Prev][Thread Next][Date Index][Thread Index]

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


On Feb 28, 2009, at 3:31 PM, <email@hidden> wrote:

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

  • Follow-Ups:
    • Re: Problems with addition of the resource
      • From: Tommy Nordgren <email@hidden>
References: 
 >Problems with addition of the resource (From: email@hidden)
 >Re: Problems with addition of the resource (From: Luke the Hiesterman <email@hidden>)

  • Prev by Date: Re: Problems with addition of the resource
  • Next by Date: Re: Problems with addition of the resource
  • Previous by thread: Re: Problems with addition of the resource
  • Next by thread: Re: Problems with addition of the resource
  • Index(es):
    • Date
    • Thread