• 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: Question about loading external image
[Date Prev][Date Next][Thread Prev][Thread Next][Date Index][Thread Index]

Re: Question about loading external image


  • Subject: Re: Question about loading external image
  • From: man lee <email@hidden>
  • Date: Mon, 24 Sep 2007 23:15:46 +0800 (CST)

Hi Chris,

Thx for your reply! I 've attached two source
file to
you. One is the C++ OpenGL file I mentioned before.
The other is a c++ file which will read/save text
file. I think their problem may be the same.

For OpenGL one, it will load the "test.tga" as
texture data, but it could only be loaded when I put
it into the "Resources" folder in Xcode. Actually,
my original attempt is to put the image next to the
standalone executable in order to read it externally.

For the C++ file processing one, it will read a
file named "input.txt" and then save it to
"output.txt"(all things will be inside the debug
folder). All stuffs run smoothly when I am in the
Xcode. But when I execute the standalone executable,
it fails. It seems that it put the output file to my
"/Users/myName " directory automatically. Also, it
can only read the "input.txt" when I put it into the
"/Users/myName " directory. Are there any settings in
Xcode wrong?

Beg your pardon, I am very new to Xcode. I
used VC++ previously. But after using Xcode, I think
I could not turn back...... Thank you!


Sam

> >
> > On Sep 20, 2007, at 6:02 AM, man lee wrote:
> >
> > > I am currently using Xcode to write c++
> > openGL
> > > codes. I wrote a programe that loads external
> > image as
> > > texture. But I found that the image file can
> just
> > be
> > > read when I import it into the "Resources"
> folder
> > of
> > > my Xcode. It could not be read by just placing
> it
> > next
> > > to the executable or any other place else. Could
> > > someone help? Thx.
> >
> > Without seeing your code that finds and loads the
> > image file, no.
> >
> > Chris




Yahoo! 全新升級網上相簿,讓你由相片中分享生活點滴! 立即全面試用

Attachment: saveText.zip
Description: 3511270418-saveText.zip

Attachment: loadImageTest.zip
Description: 1147583173-loadImageTest.zip

 _______________________________________________
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: Question about loading external image
      • From: Chris Espinosa <email@hidden>
  • Prev by Date: Re: Increasing your app's stack size
  • Next by Date: Re[2]: C++ Constructors on global vars not being run ?
  • Previous by thread: Re: subversion in xcode not showing anything
  • Next by thread: Re: Question about loading external image
  • Index(es):
    • Date
    • Thread