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

Author Topic: Getting build errors running code from the tutorial  (Read 5067 times)

0 Members and 1 Guest are viewing this topic.

JershXL

  • Newbie
  • *
  • Posts: 3
    • View Profile
Getting build errors running code from the tutorial
« on: December 28, 2015, 11:24:46 am »
I'm new to C++ and SFML, I cannot for the life of me get this to work (I'm on Visual Studio 2015 with SFML 2.3.2, using the static libraries)
#include <SFML/Graphics.hpp>

int main()
{
        sf::RenderWindow window(sf::VideoMode(200, 200), "SFML works!");
        sf::CircleShape shape(100.f);
        shape.setFillColor(sf::Color::Green);

        while (window.isOpen())
        {
                sf::Event event;
                while (window.pollEvent(event))
                {
                        if (event.type == sf::Event::Closed)
                                window.close();
                }

                window.clear();
                window.draw(shape);
                window.display();
        }

        return 0;
}
 

The errors I am getting are (only the first 3 of them, as they are all pretty much the same)
Quote
C3861 | '_builtin_huge_valf': identifier not found | SFMLTest | limits | 1115
C3861 | '_builtin_nanf': identifier not found | SFMLTest | limits | 1120
C3861 | '_builtin_nansf': identifier not found | SFMLTest | limits | 1120

And the output is
Quote
1>------ Build started: Project: SFMLTest, Configuration: Debug Win32 ------
1>  main.cpp
1>c:\program files (x86)\microsoft visual studio 14.0\vc\include\limits(1115): error C3861: '__builtin_huge_valf': identifier not found
1>c:\program files (x86)\microsoft visual studio 14.0\vc\include\limits(1120): error C3861: '__builtin_nanf': identifier not found
1>c:\program files (x86)\microsoft visual studio 14.0\vc\include\limits(1125): error C3861: '__builtin_nansf': identifier not found
1>c:\program files (x86)\microsoft visual studio 14.0\vc\include\limits(1178): error C3861: '__builtin_huge_val': identifier not found
1>c:\program files (x86)\microsoft visual studio 14.0\vc\include\limits(1183): error C3861: '__builtin_nan': identifier not found
1>c:\program files (x86)\microsoft visual studio 14.0\vc\include\limits(1188): error C3861: '__builtin_nans': identifier not found
1>c:\program files (x86)\microsoft visual studio 14.0\vc\include\limits(1241): error C3861: '__builtin_huge_val': identifier not found
1>c:\program files (x86)\microsoft visual studio 14.0\vc\include\limits(1246): error C3861: '__builtin_nan': identifier not found
1>c:\program files (x86)\microsoft visual studio 14.0\vc\include\limits(1251): error C3861: '__builtin_nans': identifier not found
========== Build: 0 succeeded, 1 failed, 0 up-to-date, 0 skipped ==========
« Last Edit: December 28, 2015, 11:27:07 am by JershXL »

Nexus

  • SFML Team
  • Hero Member
  • *****
  • Posts: 6287
  • Thor Developer
    • View Profile
    • Bromeon
Re: Getting build errors running code from the tutorial
« Reply #1 on: December 28, 2015, 11:28:02 am »
Since SFML doesn't call those functions, it seems like your setup is broken. Does this code trigger the error?
#include <limits>

int main()
{
}

If not, try to reduce your code as much as possible.
Zloxx II: action platformer
Thor Library: particle systems, animations, dot products, ...
SFML Game Development:

JershXL

  • Newbie
  • *
  • Posts: 3
    • View Profile
Re: Getting build errors running code from the tutorial
« Reply #2 on: December 28, 2015, 11:30:05 am »
Since SFML doesn't call those functions, it seems like your setup is broken. Does this code trigger the error?
#include <limits>

int main()
{
}

If not, try to reduce your code as much as possible.

Yeah, it still gives the same errors

Nexus

  • SFML Team
  • Hero Member
  • *****
  • Posts: 6287
  • Thor Developer
    • View Profile
    • Bromeon
Re: Getting build errors running code from the tutorial
« Reply #3 on: December 28, 2015, 11:35:17 am »
Ok, so it's definitely not related to SFML. You should search for the problem elsewhere, and if you don't find a solution, reinstall Visual Studio.
Zloxx II: action platformer
Thor Library: particle systems, animations, dot products, ...
SFML Game Development:

JershXL

  • Newbie
  • *
  • Posts: 3
    • View Profile
Re: Getting build errors running code from the tutorial
« Reply #4 on: December 28, 2015, 12:11:17 pm »
Ok, so it's definitely not related to SFML. You should search for the problem elsewhere, and if you don't find a solution, reinstall Visual Studio.

Installed updated C++ tools and now EVERYTHING WORKS AGAIN (SDL and SFML) Thanks for your help  :)

 

anything