#215 Objective-C typedef redefinition

open
nobody
None
5
2012-10-31
2012-08-21
Anonymous
No

I got the following error trying to use freeimage.3.15. in an objective-C project on OSX Lion:

/usr/include/objc/objc.h:44:22: error: typedef redefinition with different types ('signed char' vs 'int32_t' (aka 'int'))
typedef signed char BOOL;
^
/opt/local/include/FreeImage.h:139:17: note: previous definition is here
typedef int32_t BOOL;

My current fix involved updating the freeimage.h header and changing all reference to BOOL to BOOL_FreeImage.

This fixed the problem and now I can use the freeimage library with objective-c. But clearly it is a bit of a hack.

Discussion


Log in to post a comment.