On 12 Dec 2009, at 16:13, manolo gouy wrote:

>> All,
>>
>> Is it expected that the 1.3 codebase can still build in "non-cocoa"
>> mode?
>> I just tried this, and it fails.
>
> Yes, it is definitely my goal.
> But you reveal that there are some hickups...
>
> You just have to move, in FL/mac.H, the stuff that defines
> CGFloat when it is not known out of the
> #ifdef __APPLE_COCOA__ / #endif
> where it is now. (Caution, there are several nested #if / #endif)

OK - now this works:

I change config.h to have:

#define USE_QUARTZ 1
#define __APPLE_QUARTZ__ 1
/*#define __APPLE_COCOA__ 1 */
#undef __APPLE_COCOA__
/* #undef __APPLE_QD__ */


and I change mac.H to have:

#ifdef __APPLE_COCOA__
#  ifndef MAC_OS_X_VERSION_10_3
#    define MAC_OS_X_VERSION_10_3 1030
#  endif
#  ifndef MAC_OS_X_VERSION_10_4
#    define MAC_OS_X_VERSION_10_4 1040
#  endif
#  ifndef MAC_OS_X_VERSION_10_5
#    define MAC_OS_X_VERSION_10_5 1050
#  endif
#  ifndef MAC_OS_X_VERSION_10_6
#    define MAC_OS_X_VERSION_10_6 1060
#  endif
#  ifndef MAC_OS_X_VERSION_MAX_ALLOWED
#    define MAC_OS_X_VERSION_MAX_ALLOWED MAC_OS_X_VERSION_10_3
#  endif
#endif /* __APPLE_COCOA__ */

#ifndef CGFLOAT_DEFINED //appears with 10.5 in CGBase.h
#  if defined(__LP64__) && __LP64__
     typedef double CGFloat;
#  else
     typedef float CGFloat;
#  endif
#endif /* CGFLOAT_DEFINED */


And I can build a working "non-cocoa" fltk-1.3 from the regular  
sources (but with the patched files from recap.zip applied...)


One other thing I notice: building at the command line, it looks like  
the dependency file does not know that Fl.cxx depends on Fl_cocoa.mm,  
so if I make any changes in Fl_cocoa.mm, it does not correctly  
trigger a recompile of Fl.cxx...




_______________________________________________
fltk-dev mailing list
[email protected]
http://lists.easysw.com/mailman/listinfo/fltk-dev

Reply via email to