Building FLTK under OS X 10.10.2 - LLVM : __format__ ??

27 views
Skip to first unread message

Thierry Jeanneret

unread,
Feb 23, 2015, 6:33:26 AM2/23/15
to fltkg...@googlegroups.com
Hello There,

As a beginner in C++ I am trying to configure FLTK in order to follow the Stroustrup book "Programmation - Principes et pratique avec C++".

I am attempting to build it in Xcode 6.1.1.Everything seems OK, apart of a strange message : 


void write_string(const char *,...) __fl_attr((__format__ (__printf__, 1, 2))); Attribute declaration must precede definition


This error occurs 6 times in the whole build, in the files Fl_ask.h and Fl_type.h. I have tried to find a declaration for __format__, but I haven't got it. 

Could somebody tell me what I can do to make it right ?

Thanks in advance,

Thierry

Kevin Ingwersen (Ingwie Phoenix)

unread,
Feb 23, 2015, 4:17:55 PM2/23/15
to fltkg...@googlegroups.com
I don’t get this error - then again, I use the ./configure && make variant. Is it a requirement for you to build with XCode?

--
You received this message because you are subscribed to the Google Groups "fltk.general" group.
To unsubscribe from this group and stop receiving emails from it, send an email to fltkgeneral...@googlegroups.com.
For more options, visit https://groups.google.com/d/optout.

manol...@gmail.com

unread,
Feb 24, 2015, 5:02:39 AM2/24/15
to fltkg...@googlegroups.com


On Monday, 23 February 2015 12:33:26 UTC+1, Thierry Jeanneret wrote:
Hello There,

As a beginner in C++ I am trying to configure FLTK in order to follow the Stroustrup book "Programmation - Principes et pratique avec C++".

I am attempting to build it in Xcode 6.1.1.Everything seems OK, apart of a strange message : 


void write_string(const char *,...) __fl_attr((__format__ (__printf__, 1, 2))); Attribute declaration must precede definition


This error occurs 6 times in the whole build, in the files Fl_ask.h and Fl_type.h. I have tried to find a declaration for __format__, but I haven't got it.

This warning is fixed in the current repository of the FLTK library.
The fix is to move, in file fluid/file.cxx, these two include statements:
#include <FL/Fl.H>
#include "Fl_Widget_Type.h"
from lines 295-296 to after line 29

Alternatively, you can use the current FLTK version from the svn repository
or from the last weekly snapshot.

Thierry Jeanneret

unread,
Feb 25, 2015, 10:28:43 AM2/25/15
to fltkg...@googlegroups.com
Thanks a lot, I have moved these include directives and it's OK. I still get warnings, but this is about a "underscore" character in info.plist :


(null): invalid character '_' in Bundle Identifier at column 13. This string must be a uniform type identifier (UTI) that contains only alphanumeric (A-Z,a-z,0-9), hyphen (-), and period (.) characters.


I will try to get it solved, but if you have an idea, why not ? ;-)

Have a nice day,

Thierry

MacArthur, Ian (Selex ES, UK)

unread,
Feb 25, 2015, 11:55:25 AM2/25/15
to fltkg...@googlegroups.com
> Thanks a lot, I have moved these include directives
> and it's OK.


OK, good you got it working.
Though, rather than editing your copy, it would probably be better to just upgrade to the current weekly snapshot, that should have the fixes in anyway.


> I still get warnings, but this is about a "underscore"
> character in info.plist :

> (null): invalid character '_' in Bundle Identifier at
> column 13. This string must be a uniform type identifier
> (UTI) that contains only alphanumeric (A-Z,a-z,0-9),
> hyphen (-), and period (.) characters.

> I will try to get it solved, but if you have an idea, why not ? ;-)


Um, it seems to be saying that you aren't allowed to use an underscore in the Bundle Identifier, it has to be a valid UTI.

They are hierarchical and they usually have the format like:

<string>org.myCompanyName.myProgramMame</string>

or similar.

What string do you have set for your Bundle Identifier?





Selex ES Ltd
Registered Office: Sigma House, Christopher Martin Road, Basildon, Essex SS14 3EL
A company registered in England & Wales. Company no. 02426132
********************************************************************
This email and any attachments are confidential to the intended
recipient and may also be privileged. If you are not the intended
recipient please delete it from your system and notify the sender.
You should not copy it or use it for any purpose nor disclose or
distribute its contents to any other person.
********************************************************************
Reply all
Reply to author
Forward
0 new messages