Welcome, Guest. Please login or register. Did you miss your activation email?

Author Topic: Missing library header, GCC 4.8.1  (Read 3316 times)

0 Members and 1 Guest are viewing this topic.

Karsomir

  • Newbie
  • *
  • Posts: 14
    • View Profile
Missing library header, GCC 4.8.1
« on: August 21, 2013, 02:24:22 am »
I've recently changed compiler from earlier version of gcc 4.7.0 into gcc 4.8.1 from MinGW-builds project.
I've compiled sfml from sources, everything went okay, but somehow g++ refuses to see headers from sfml.
File it complains is exactly there "C:\MinGW\mingw32\include\SFML" where it should be. What could it be.


Laurent

  • Administrator
  • Hero Member
  • *****
  • Posts: 32498
    • View Profile
    • SFML's website
    • Email
Re: Missing library header, GCC 4.8.1
« Reply #1 on: August 21, 2013, 07:45:15 am »
Don't copy SFML headers and libs in your MinGW folder, this is a really bad habit. Keep SFML in its own folder, and tell the compiler and linker where it is with -I and -L options.
Laurent Gomila - SFML developer

Karsomir

  • Newbie
  • *
  • Posts: 14
    • View Profile
Re: Missing library header, GCC 4.8.1
« Reply #2 on: August 21, 2013, 03:55:11 pm »
Thanks. That did the job. Still I have a problem though ... I was installing new compiler because old MinGW ( doesnt know that 'to_string' is a std member, but 4.8.1 doesn't know it either. It's kinda stupid Anyone knows how to make it work?

I found this:
http://gcc.gnu.org/bugzilla/show_bug.cgi?id=52015
http://tehsausage.com/mingw-to-string
But not really sure what should I do. There is a patch for version 4.7.x that didn't worked for me when i was using 4.7.x. Any thoughts?

eXpl0it3r

  • SFML Team
  • Hero Member
  • *****
  • Posts: 11034
    • View Profile
    • development blog
    • Email
Re: Missing library header, GCC 4.8.1
« Reply #3 on: August 21, 2013, 03:59:42 pm »
I was installing new compiler because old MinGW ( doesnt know that 'to_string' is a std member, but 4.8.1 doesn't know it either. It's kinda stupid Anyone knows how to make it work?
std::to_string is a C++11 feature, so to use it with GCC/MinGW, you'll have to add -std=c++11 to your compiler flags. ;)
Official FAQ: https://www.sfml-dev.org/faq.php
Official Discord Server: https://discord.gg/nr4X7Fh
——————————————————————
Dev Blog: https://duerrenberger.dev/blog/

Karsomir

  • Newbie
  • *
  • Posts: 14
    • View Profile
Re: Missing library header, GCC 4.8.1
« Reply #4 on: August 21, 2013, 04:02:12 pm »
Yeaaaah finally! Thanks a ton!
« Last Edit: August 21, 2013, 04:13:40 pm by Karsomir »