Re: ImageIO key properties

2008-04-07 Thread David Duncan

On Apr 6, 2008, at 11:22 PM, Mirko Viviani wrote:

for an application targeted for 10.4 I need to access the value of  
some key properties defined
for 10.5 in CGImageProperties.h, like  
kCGImagePropertyExifAuxDictionary.


Is there a legal way to do this?



Assuming you have your project set properly, standard weak-linking  
policies should apply. See the Frameworks Programming Guide on  
Frameworks and Weak Linking at http://developer.apple.com/documentation/MacOSX/Conceptual/BPFrameworks/Concepts/WeakLinking.html 


--
David Duncan
Apple DTS Animation and Printing
[EMAIL PROTECTED]



___

Cocoa-dev mailing list (Cocoa-dev@lists.apple.com)

Please do not post admin requests or moderator comments to the list.
Contact the moderators at cocoa-dev-admins(at)lists.apple.com

Help/Unsubscribe/Update your Subscription:
http://lists.apple.com/mailman/options/cocoa-dev/archive%40mail-archive.com

This email sent to [EMAIL PROTECTED]


Re: ImageIO key properties

2008-04-07 Thread Mirko Viviani

On 07/apr/08, at 19:43, David Duncan wrote:

for an application targeted for 10.4 I need to access the value of  
some key properties defined
for 10.5 in CGImageProperties.h, like  
kCGImagePropertyExifAuxDictionary.


Assuming you have your project set properly, standard weak-linking  
policies should apply. See the Frameworks Programming Guide on  
Frameworks and Weak Linking at http://developer.apple.com/documentation/MacOSX/Conceptual/BPFrameworks/Concepts/WeakLinking.html 



I didn't remember this flag. Anyway since I'm having some undefined  
symbols I did a small test with 10.5 sdk (xcode 3.0)



#import Cocoa/Cocoa.h
#import ApplicationServices/ApplicationServices.h


int main(int argc, char *argv[])
{
CFStringRef dictName[] = {
kCGImagePropertyExifAuxDictionary,
kCGImagePropertyDNGDictionary,
};

printf(%p, dictName);

return 0;
}


Ld /tmp/pippo/build/pippo.build/Release/pippo.build/Objects-normal/ 
i386/pippo normal i386

cd /tmp/pippo
/Developer/usr/bin/gcc-4.0 -o /tmp/pippo/build/pippo.build/ 
Release/pippo.build/Objects-normal/i386/pippo -L/tmp/pippo/build/ 
Release -F/tmp/pippo/build/Release -filelist /tmp/pippo/build/ 
pippo.build/Release/pippo.build/Objects-normal/i386/pippo.LinkFileList  
-arch i386 -mmacosx-version-min=10.5 -weak_framework  
ApplicationServices -weak_framework Cocoa -isysroot /Developer/SDKs/ 
MacOSX10.5.sdk

Undefined symbols:
  _kCGImagePropertyDNGDictionary, referenced from:
  _kCGImagePropertyDNGDictionary$non_lazy_ptr in main.o
ld: symbol(s) not found
collect2: ld returned 1 exit status


I've tried linking with -framework and -weak_framework with the same  
results.
kCGImagePropertyDNGDictionary and others properties declared in  
CGImageProperties.h are not defined in the framework.

Is it a bug or am I missing something?

Thank you.

--
Ciao,
Mirko
___

Cocoa-dev mailing list (Cocoa-dev@lists.apple.com)

Please do not post admin requests or moderator comments to the list.
Contact the moderators at cocoa-dev-admins(at)lists.apple.com

Help/Unsubscribe/Update your Subscription:
http://lists.apple.com/mailman/options/cocoa-dev/archive%40mail-archive.com

This email sent to [EMAIL PROTECTED]


Re: ImageIO key properties

2008-04-07 Thread David Duncan

On Apr 7, 2008, at 12:46 PM, Mirko Viviani wrote:

I've tried linking with -framework and -weak_framework with the same  
results.
kCGImagePropertyDNGDictionary and others properties declared in  
CGImageProperties.h are not defined in the framework.

Is it a bug or am I missing something?



You shouldn't need to specify the actual link parameters, just set the  
SDK (to 10.5) and the deployment target (to 10.4) and Xcode should  
figure everything out for you.


That said, this does look suspicious since the framework didn't  
declare kCGImagePropertyDNGDictionary until 10.5 but there is no  
availability macro attached to it. You should file a bug.

--
David Duncan
Apple DTS Animation and Printing
[EMAIL PROTECTED]



___

Cocoa-dev mailing list (Cocoa-dev@lists.apple.com)

Please do not post admin requests or moderator comments to the list.
Contact the moderators at cocoa-dev-admins(at)lists.apple.com

Help/Unsubscribe/Update your Subscription:
http://lists.apple.com/mailman/options/cocoa-dev/archive%40mail-archive.com

This email sent to [EMAIL PROTECTED]