|
|
|
Hi,
When building the xcode project of the iphone version of SDL_image I get the following linker errors
Undefined symbols:
"_kUTTypeBMP", referenced from:
_kUTTypeBMP$non_lazy_ptr in libSDL_image.a(IMG_UIImage.o)
"_kUTTypeGIF", referenced from:
_kUTTypeGIF$non_lazy_ptr in libSDL_image.a(IMG_UIImage.o)
"_kUTTypePNG", referenced from:
_kUTTypePNG$non_lazy_ptr in libSDL_image.a(IMG_UIImage.o)
"_kUTTypeJPEG", referenced from:
_kUTTypeJPEG$non_lazy_ptr in libSDL_image.a(IMG_UIImage.o)
"_kUTTypeTIFF", referenced from:
_kUTTypeTIFF$non_lazy_ptr in libSDL_image.a(IMG_UIImage.o)
In what framework for iphone can I find these symbols?
Thanks in advance
WP
wpvanpaassen |
01.05.09 - 10:09 am | #
|
|
To be more clear
It builds fine (I had to add libjpg.a and libpng.a) to the project's linked libraries, but I get these linker errors when including the SDL_image.a library in my own iphone project. It seems these symbols are missing from the iphone libraries??
Thanks
WP
wpvanpaassen |
01.05.09 - 12:09 pm | #
|
|
This doesn't sound right for a couple of reasons. First, _kUTTypeBMP and friends should only be used on the Mac, not iPhone. Second, the point of this patch was to no longer require linking libpng and libjpeg.
So verify a few things. First, make sure you are using the Xcode_iPhone project. (I kept the Mac and iPhone Xcode projects separate.)
Second, make sure you select the build configuration with the suffix "_UIImage".
Third, make sure that the IMG_UIImage.m is being built by the target and not IMG_ImageIO.c.
I will take a deeper look at the project a little later.
Eric Wing |
01.05.09 - 12:37 pm | #
|
|
Oh, I see part of the problem. I left in UTTypeBMP and friends in the UIImage implementation. I don't think they should be there. They aren't actually used by anything.
In the UIImage implementation, change all those constants to NULL and let me know what happens.
You should also remove the linking to libjpeg.a and libpng.a. They aren't supposed to be ued. These are only going to cause you problems as the architecture is only Intel/PPC, and not ARM. I'm not sure why linking to them helped you.
Eric Wing |
01.05.09 - 12:46 pm | #
|
|
Yes, nulling the UTTypes works. I also noticed that the ApplicationServices framework is used for linking, I removed it as this framework is not available for iphone and masked the fact that the UTTypes were still being used.
I also removed -ljpeg and -lpng from the linker flags in the project settings so now libtool won't complain about missing these static libs.
Finally I had to add my version of the static sdl library for iphone for linking. (in this case libSDLSimulator.a)
It builds now, I'll check if it actually works next 
WP
wpvanpaassen |
01.05.09 - 1:46 pm | #
|
|
Okay, I figured out why you had so many problems. The Xcode_iPhone project is really stale. It looks like I failed to push my latest version.
I just updated my Mercurial repos, and just posted updates to the SDL mailing list so hopefully SVN will get them in soon.
Thanks for catching these problems.
Eric Wing |
01.05.09 - 8:41 pm | #
|
|
Hello !
I have some problems with the SDL_ImageIO.c file
When I try to compile it, Xcode say me than:
- CGImageSourceRef is an undeclared type
- 'CGDataProviderCreate' is deprecated and unavailable (declared at /Developer/Platforms/iPhoneSimulator.platform/
Developer/SDKs/iPhoneSimulator2.0.sdk/System/
Library/Frameworks/CoreGraphics.framework/Headers/
CGDataProvider.h:225)
- CGImageSourceCreateWithURL is undeclared etc...
I feel that Apple has changed its Image iphone API and I can't use your SDL_Image fixed version...
Can you help me ?
Thanks
Fella |
03.28.09 - 12:55 pm | #
|
|
You are using the wrong backend. You are using the ImageIO backend, but that doesn't work on the iPhone, You must use the UIImage backend which is iPhone specific. Make sure you are using the Xcode_iPhone.tar.gz instead of the Xcode.tar.gz.
Eric Wing |
03.28.09 - 2:34 pm | #
|
|
Commenting by HaloScan
|