TGUI Forum

General Category => Installation help => Topic started by: TheOnlyWRT on 05 March 2019, 00:31:42

Title: TGUI installation on Xcode gives 25 errors
Post by: TheOnlyWRT on 05 March 2019, 00:31:42
Hello all,

I am trying to install TGUI to use with SFML in xcode. I followed the tutorial to build it as a framework and then added the framework to my project. However, when I do as little as include TGUI in the headers, I get 25 errors. A lot of them are the same, but they are the following errors:

Quote

/Library/Frameworks/TGUI.framework/Headers/SignalImpl.hpp:155:20: Deduced return types are a C++14 extension
/Library/Frameworks/TGUI.framework/Headers/SignalImpl.hpp:149:38: No member named 'index_sequence_for' in namespace 'std'
/Library/Frameworks/TGUI.framework/Headers/SignalImpl.hpp:149:57: 'UnboundArgs' does not refer to a value
/Library/Frameworks/TGUI.framework/Headers/SignalImpl.hpp:155:20: Deduced return types are a C++14 extension
/Library/Frameworks/TGUI.framework/Headers/SignalImpl.hpp:66:20: No viable conversion from returned value of type 'std::string' (aka 'basic_string<char, char_traits<char>, allocator<char> >') to function return type 'int'
/Library/Frameworks/TGUI.framework/Headers/SignalImpl.hpp:73:20: No viable conversion from returned value of type 'sf::Vector2f' (aka 'Vector2<float>') to function return type 'int'


I assume i built everything correctly, as I followed the instructions step by step, but I could have easily done something wrong. Has anyone else run into this problem, or does anyone know how to fix it?

Thank you!
Title: Re: TGUI installation on Xcode gives 25 errors
Post by: texus on 05 March 2019, 08:11:24
TGUI requires C++14.
The tutorial for macOS don't seem to mention it, but you have to enable it in your project. Somewhere in your project (I don't know where as I don't have macOS to check right now) you have to add the "-std=c++14" flag (I'm sure you will find some information online on how to add that compiler flag).