Re: Building a metadata importer
Re: Building a metadata importer
- Subject: Re: Building a metadata importer
- From: Rua Haszard Morris <email@hidden>
- Date: Thu, 24 Aug 2006 10:49:48 +1200
I think the problem may be that the dead stripping isn't working for
you - we had a similar problem with our metadata importer as it
borrows from the source code for a much larger app.
In the end I solved it by specifying an export file to export all the
symbols (entry points) needed by spotlight. Once the linker knew what
the entry points were it was able to ignore unresolved references in
now-dead code. (the exp file contents are pasted below in case that's
what you need)
I'm not convinced that _all_ of the dead code is getting stripped
however.. but that's a slightly different issue.
good luck
Rua HM.
// exported symbols for a metadata importer
_MetadataImporterPluginFactory
_MetadataImporterPluginRelease
_MetadataImporterQueryInterface
_MetadataImporterPluginAddRef
_DeallocMetadataImporterPluginType
_AllocMetadataImporterPluginType
On 24/08/2006, at 9:23 AM, Kevin Meaney wrote:
Philippe,
Thanks for the suggestion but I don't think that is my problem. My
GetMetadataForFile function is in a .c file, compiled as c and not c
++. It calls a C++ function but that function is declared in a
header file with the extern "C" wrappers around the declaration,
and implemented in a .cp file. So I'm still looking for an answer.
Thanks somebody.
Kevin
#ifdef __cplusplus
extern "C" {
#endif
Boolean GetMetadataForFile(void* thisInterface,
CFMutableDictionaryRef attributes,
CFStringRef contentTypeUTI,
CFStringRef pathToFile)
{
/* Pull any available metadata from the file at the specified
path
*/
/* Return the attribute keys and attribute values in the dict */
/* Return TRUE if successful, FALSE if there was no data
provided */
// Convert the path to an FSRef
char strTemp[2048];
FSRef fsr;
CFStringGetCString(pathToFile, strTemp, 2048,
kCFStringEncodingASCII);
if (noErr != FSPathMakeRef((unsigned char *)strTemp,
&fsr, NULL))
return FALSE;
// Now that we have our FSRef, parse the RIFF file
return (RIFF_Metadata(&fsr, attributes));
}
#ifdef __cplusplus
}
#endif
_______________________________________________
Do not post admin requests to the list. They will be ignored.
Xcode-users mailing list (email@hidden)
Help/Unsubscribe/Update your Subscription:
40adinstruments.com
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