On 31 Dec 2007, at 7:02 PM, Adam R. Maxwell wrote: > > On Dec 31, 2007, at 9:51 AM, Christiaan Hofman wrote: > >> I'm trying to import FVPreviewer into a BibDesk file. But it fails, >> eith this error: >> >> In file included from /Developer/SDKs/MacOSX10.4u.sdk/System/Library/ >> Frameworks/QTKit.framework/Headers/QTKit.h:10, >> from /Users/hofman/Development/BuildProducts/Debug/ >> FileView.framework/Headers/FVPreviewer.h:41, >> from /Users/hofman/Development/Bibdesk/trunk/ >> bibdesk/BibDocument_Actions.m:87: >> /Developer/SDKs/MacOSX10.4u.sdk/System/Library/Frameworks/ >> QTKit.framework/Headers/QTKitDefines.h:116: error: two or more data >> types in declaration specifiers >> /Developer/SDKs/MacOSX10.4u.sdk/System/Library/Frameworks/ >> QTKit.framework/Headers/QTKitDefines.h:117: error: duplicate >> 'unsigned' >> >> It is in the declaration of NSInteger and NSUInteger for the 10.4u >> SDK in QT. I don't know why it shouldn't work. Any idea? > > It works for me if I use #import <FileView/FVPreviewer.h> in > BibDocument_Actions.m, which it looks like you did. > > What's in your QTKitDefines.h file? The one from the 10.4 SDK on > Leopard looks like this (in its entirety): > > /* > File: QTKitDefines.h > > Copyright: (c)2004 by Apple Computer, Inc., all rights reserved. > > */ > > > #ifndef _QTKITDEFINES_H > #define _QTKITDEFINES_H > > #ifdef __cplusplus > #define QTKIT_EXTERN extern "C" > #else > #define QTKIT_EXTERN extern > #endif > > #endif
Here it has much more. The offending bit is this: #ifndef NSINTEGER_DEFINED #if __LP64__ || NS_BUILD_32_LIKE_64 typedef long NSInteger; typedef unsigned long NSUInteger; #else typedef int NSInteger; typedef unsigned int NSUInteger; #endif I think the problem is that NSInteger and NSUInteger are defined twice. In the FileView project NSINTEGER_DEFINED is set to 1, so this part is not called. But not in Bibdesk. I've moved the framework header imports in FVPreviewer.h to the implementation files, and that fixes it. Christiaan ------------------------------------------------------------------------- This SF.net email is sponsored by: Microsoft Defy all challenges. Microsoft(R) Visual Studio 2005. http://clk.atdmt.com/MRT/go/vse0120000070mrt/direct/01/ _______________________________________________ Bibdesk-develop mailing list Bibdesk-develop@lists.sourceforge.net https://lists.sourceforge.net/lists/listinfo/bibdesk-develop