Hello guys, I have a problem with setting up SFML and NetBeans with minGW compiler. Looks like I connected all correctly, I'm using SFML 2.2 build for MinGW - 32bit
I'm trying to compile this simple code :
#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;
}
and I get this error
"/C/MinGW/msys/1.0/bin/make.exe" -f nbproject/Makefile-Release.mk QMAKE= SUBPROJECTS= .build-conf
make.exe[1]: Entering directory `/d/NetBeansProj/SFML_ENGINE'
"/C/MinGW/msys/1.0/bin/make.exe" -f nbproject/Makefile-Release.mk dist/Release/MinGW-Windows/sfml_engine.exe
make.exe[2]: Entering directory `/d/NetBeansProj/SFML_ENGINE'
mkdir -p build/Release/MinGW-Windows
rm -f "build/Release/MinGW-Windows/main.o.d"
g++ -c -O2 -DSFML_STATIC -I../../SFML-2.2/include -std=c++11 -MMD -MP -MF "build/Release/MinGW-Windows/main.o.d" -o build/Release/MinGW-Windows/main.o main.cpp
In file included from c:\mingw\lib\gcc\mingw32\4.8.1\include\c++\cmath:44:0,
from c:\mingw\lib\gcc\mingw32\4.8.1\include\c++\random:38,
from c:\mingw\lib\gcc\mingw32\4.8.1\include\c++\bits\stl_algo.h:65,
from c:\mingw\lib\gcc\mingw32\4.8.1\include\c++\algorithm:62,
from ../../SFML-2.2/include/SFML/System/Utf.hpp:32,
from ../../SFML-2.2/include/SFML/System/String.hpp:32,
from ../../SFML-2.2/include/SFML/System.hpp:39,
from ../../SFML-2.2/include/SFML/Window.hpp:32,
from ../../SFML-2.2/include/SFML/Graphics.hpp:32,
from main.cpp:1:
c:\mingw\include\math.h: In function 'float hypotf(float, float)':
c:\mingw\include\math.h:635:30: error: '_hypot' was not declared in this scope
{ return (float)(_hypot (x, y)); }
^
make.exe[2]: *** [build/Release/MinGW-Windows/main.o] Error 1
make.exe[2]: Leaving directory `/d/NetBeansProj/SFML_ENGINE'
make.exe[1]: *** [.build-conf] Error 2
make.exe[1]: Leaving directory `/d/NetBeansProj/SFML_ENGINE'
make.exe": *** [.build-impl] Error 2
BUILD FAILED (exit value 2, total time: 1s)
tried reinstalling minGW twice and tried googling, but no result, that's why I'm here