*

gupas

  • *
  • 23
    • View Profile
Some problems to build TGUI after your last commit
« on: 31 July 2013, 11:07:45 »
Hello,

I just tried to build the last version of TGUI, but...
Code: [Select]
C:\Users\gupas\Desktop\TGUI\src\TGUI\TGUI.cpp: In function 'sf::Color tgui::extractColor(std::string)':
C:\Users\gupas\Desktop\TGUI\src\TGUI\TGUI.cpp:60:27: error: 'stoi' is not a member of 'std'
C:\Users\gupas\Desktop\TGUI\src\TGUI\TGUI.cpp:68:33: error: 'stoi' is not a member of 'std'
C:\Users\gupas\Desktop\TGUI\src\TGUI\TGUI.cpp:76:36: error: 'stoi' is not a member of 'std'
C:\Users\gupas\Desktop\TGUI\src\TGUI\TGUI.cpp:80:37: error: 'stoi' is not a member of 'std'
C:\Users\gupas\Desktop\TGUI\src\TGUI\TGUI.cpp:85:36: error: 'stoi' is not a member of 'std'
C:\Users\gupas\Desktop\TGUI\src\TGUI\TGUI.cpp: In function 'std::string tgui::convertColorToString(const sf::Color&)':
C:\Users\gupas\Desktop\TGUI\src\TGUI\TGUI.cpp:108:26: error: 'to_string' is not a member of 'std'
C:\Users\gupas\Desktop\TGUI\src\TGUI\TGUI.cpp:109:26: error: 'to_string' is not a member of 'std'
C:\Users\gupas\Desktop\TGUI\src\TGUI\TGUI.cpp:110:26: error: 'to_string' is not a member of 'std'
C:\Users\gupas\Desktop\TGUI\src\TGUI\TGUI.cpp:111:26: error: 'to_string' is not a member of 'std'
C:\Users\gupas\Desktop\TGUI\src\TGUI\TGUI.cpp:114:26: error: 'to_string' is not a member of 'std'
C:\Users\gupas\Desktop\TGUI\src\TGUI\TGUI.cpp:115:26: error: 'to_string' is not a member of 'std'
C:\Users\gupas\Desktop\TGUI\src\TGUI\TGUI.cpp:116:26: error: 'to_string' is not a member of 'std'
C:\Users\gupas\Desktop\TGUI\src\TGUI\TGUI.cpp: In function 'bool tgui::extractVector2f(std::string, tgui::Vector2f&)':
C:\Users\gupas\Desktop\TGUI\src\TGUI\TGUI.cpp:139:32: error: 'stof' is not a member of 'std'
C:\Users\gupas\Desktop\TGUI\src\TGUI\TGUI.cpp:143:32: error: 'stof' is not a member of 'std'
C:\Users\gupas\Desktop\TGUI\src\TGUI\TGUI.cpp: In function 'bool tgui::extractVector2u(std::string, tgui::Vector2u&)':
C:\Users\gupas\Desktop\TGUI\src\TGUI\TGUI.cpp:173:58: error: 'stoi' is not a member of 'std'
C:\Users\gupas\Desktop\TGUI\src\TGUI\TGUI.cpp:177:58: error: 'stoi' is not a member of 'std'
C:\Users\gupas\Desktop\TGUI\src\TGUI\TGUI.cpp: In function 'bool tgui::extractVector4u(std::string, tgui::Vector4u&)':
C:\Users\gupas\Desktop\TGUI\src\TGUI\TGUI.cpp:207:33: error: 'stoi' is not a member of 'std'
C:\Users\gupas\Desktop\TGUI\src\TGUI\TGUI.cpp:215:37: error: 'stoi' is not a member of 'std'
C:\Users\gupas\Desktop\TGUI\src\TGUI\TGUI.cpp:223:41: error: 'stoi' is not a member of 'std'
C:\Users\gupas\Desktop\TGUI\src\TGUI\TGUI.cpp:227:41: error: 'stoi' is not a member of 'std'
C:\Users\gupas\Desktop\TGUI\src\TGUI\TGUI.cpp: In function 'std::string tgui::convertColorToString(const sf::Color&)':
C:\Users\gupas\Desktop\TGUI\src\TGUI\TGUI.cpp:118:5: warning: control reaches end of non-void function [-Wreturn-type]

But I don't know what is wrong...
(I used CodeBlocks/Mingw)
Should I use SFML compiled with c++11 now? It is strange, but until your last commit it worked great with "only" the -std=c++0x option enabled.

Re: Some problems to build TGUI after your last commit
« Reply #1 on: 31 July 2013, 11:55:09 »
It's bug in mingw. There is workaround on the web (just download and copy paste few files). Or you can use visual c++

*

texus

  • *****
  • 1161
    • View Profile
    • Texus's Blog
Re: Some problems to build TGUI after your last commit
« Reply #2 on: 31 July 2013, 11:56:12 »
Damn, thats what you get when coding on linux with gcc 4.8 installed.

I'll revert that part of the commit. After searching, it seems like there are problems with MinGW and these function. They are not yet supported without patching the compiler.

Edit: I can't force everone to install an extra patch just to use tgui, so I'll just won't use the functions.

Re: Some problems to build TGUI after your last commit
« Reply #3 on: 31 July 2013, 11:58:28 »
Texus, it works on linux gcc 4.6. Mingw 4.7 is just lagged behind....

*

gupas

  • *
  • 23
    • View Profile
Re: Some problems to build TGUI after your last commit
« Reply #4 on: 31 July 2013, 12:10:36 »
netrick: I have personally no problem if I need to install a patch, but texus is right: a lib should avoid depend of such things.
to_string and sto* functions are not very importants (and custom functions can easily do the same).
texus: ok. Thanks for your answer.

*

texus

  • *****
  • 1161
    • View Profile
    • Texus's Blog
Re: Some problems to build TGUI after your last commit
« Reply #5 on: 31 July 2013, 12:11:34 »
Its fixed by now by the way.

Re: Some problems to build TGUI after your last commit
« Reply #6 on: 31 July 2013, 14:57:56 »
I still don't get why old c++ standard doesn't have string-numeric conversion by default... It's so damn important and every app use it basically. It's very easy to write it yourself with template function using string streams, but still...