FLTK logo

STR #3063

FLTK matrix user chat room
(using Element browser app)   FLTK gitter user chat room   GitHub FLTK Project   FLTK News RSS Feed  
  FLTK Apps      FLTK Library      Forums      Links     Login 
 Home  |  Articles & FAQs  |  Bugs & Features  |  Documentation  |  Download  |  Screenshots  ]
 

Return to Bugs & Features | Roadmap 1.3 | SVN ⇄ GIT ]

STR #3063

Application:FLTK Library
Status:1 - Closed w/Resolution
Priority:3 - Moderate, e.g. unable to compile the software
Scope:2 - Specific to an operating system
Subsystem:MacOS
Summary:OSX build error on Tiger (10.4.11): 'CTFontRef' does not name a type
Version:1.3-current
Created By:greg.ercolano
Assigned To:manolo
Fix Version:1.3-current (SVN: v10129)
Update Notification:

Receive EMails Don't Receive EMails

Trouble Report Files:

No files


Trouble Report Comments:


Name/Time/Date Text  
 
#1 greg.ercolano
10:22 Mar 07, 2014
Getting this with a default build on 10.9.11 with fltk svn current:

=== making src ===
Compiling Fl_cocoa.mm...
../FL/../src/Fl_Font.H:57: error: 'CTFontRef' does not name a type
Fl_cocoa.mm: In member function 'void Fl_Paged_Device::print_window(Fl_Window*, int, int)':
Fl_cocoa.mm:3472: error: invalid conversion from 'int' to 'NSStringDrawingOptions'
make[1]: *** [Fl_cocoa.o] Error 1
make: *** [all] Error 1

# sw_vers
ProductName: Mac OS X
ProductVersion: 10.4.11
BuildVersion: 8S2167
 
 
#2 greg.ercolano
16:21 Mar 07, 2014
Treating these two errors one at a time:

[1] ./FL/../src/Fl_Font.H:57: error: 'CTFontRef' does not name a type
[2] Fl_cocoa.mm:3472: error: invalid conversion from 'int' to 'NSStringDrawingOptions'

Regarding [1]:

    Seems the CTFontRef line tripping that error  is supposed to be
    #ifdef'ed out with the following logic when built on 10.4 (my case):

#     if MAC_OS_X_VERSION_MAX_ALLOWED >= MAC_OS_X_VERSION_10_5
  CTFontRef fontref;
  [..]

    ..but apparently MAC_OS_X_VERSION_10_5 is undefined at this time.
    I found it defined in mac.H, but I was unable #include <FL/x.H> (which
    in turn loads mac.H), so I simply #define'ed it to get past that error.
    Not sure what the right solution is.

Regarding [2]:

    The line in question currently reads:

[title_s drawWithRect:r options:0 attributes:attr]; // 10.4

    Was able to get it to compile by changing that to read:

[title_s drawWithRect:r options:(NSStringDrawingOptions)0 attributes:attr]; // 10.4

    Again, not sure if that's right or not.. I don't fully
    grok Obj-C, but it seemed happy enough with that.
 
 
#3 ianmacarthur
16:21 Mar 11, 2014
One for Manolo I guess...?  
 
#4 greg.ercolano
16:26 Mar 11, 2014
Ya, wanna wait for his input..  
 
#5 greg.ercolano
11:48 Apr 23, 2014
Correction, the OS version is 10.4.11.. (STR title says "10.9.11" which is wrong)  
 
#6 manolo
07:18 Apr 27, 2014
Should be fixed in the current SVN.
Greg: can you confirm, please?
 
 
#7 greg.ercolano
20:05 Apr 28, 2014
Confirmed! Much thanks.

I take it from r10128 that the patch suggestion in #2 section [2]
was the way to go.. glad that's right, as I used it in production code
on my end.

I see you made other mods as well to fix #2 section [1],
so feel free to close..
 
 
#8 manolo
01:45 May 02, 2014
Fixed in Subversion repository.  
     

Return to Bugs & Features ]

 
 

Comments are owned by the poster. All other content is copyright 1998-2024 by Bill Spitzak and others. This project is hosted by The FLTK Team. Please report site problems to 'erco@seriss.com'.