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

Author Topic: NetBeans problem  (Read 4024 times)

0 Members and 3 Guests are viewing this topic.

excentio

  • Newbie
  • *
  • Posts: 21
    • View Profile
NetBeans problem
« on: January 11, 2015, 04:06:12 am »
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
« Last Edit: January 11, 2015, 04:07:51 am by excentio »

eXpl0it3r

  • SFML Team
  • Hero Member
  • *****
  • Posts: 11016
    • View Profile
    • development blog
    • Email
AW: NetBeans problem
« Reply #1 on: January 11, 2015, 12:43:22 pm »
What MinGW file did you download and install?
What exact SFML package did you download?
Official FAQ: https://www.sfml-dev.org/faq.php
Official Discord Server: https://discord.gg/nr4X7Fh
——————————————————————
Dev Blog: https://duerrenberger.dev/blog/

excentio

  • Newbie
  • *
  • Posts: 21
    • View Profile
Re: AW: NetBeans problem
« Reply #2 on: January 11, 2015, 04:25:25 pm »
What MinGW file did you download and install?
What exact SFML package did you download?

this is MinGW file which I downloaded and installedhttp://www.mingw.org/
and this is the SFML package which I downloaded

eXpl0it3r

  • SFML Team
  • Hero Member
  • *****
  • Posts: 11016
    • View Profile
    • development blog
    • Email
Re: NetBeans problem
« Reply #3 on: January 11, 2015, 05:21:34 pm »
The compiler version of the SFML package and your compiler version have to fully match. The SFML package you download has been compiled with this compiler.
Official FAQ: https://www.sfml-dev.org/faq.php
Official Discord Server: https://discord.gg/nr4X7Fh
——————————————————————
Dev Blog: https://duerrenberger.dev/blog/