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

Author Topic: Application not compiling with SFML 2.1  (Read 791 times)

0 Members and 1 Guest are viewing this topic.

Wilds

  • Newbie
  • *
  • Posts: 2
    • View Profile
Application not compiling with SFML 2.1
« on: December 05, 2013, 04:24:40 pm »
Hello people, this is my first time here.
I am having a compiling issue, I have tried most settings but it will not work.
Using Mingw32 and GCC version 4.8.1

#include "SFML/Graphics.hpp"
#include "SFML/Window.hpp"
#include "SFML/System.hpp"

int main(int argc, char* argv[])
{
    sf::RenderWindow gameWindow(sf::VideoMode(1024,768), "SFML practice");
   
    sf::Event event;
    while(gameWindow.isOpen())
    {
        while(gameWindow.pollEvent(event))
        {
            if(event.type == sf::Event::Closed)
            {
                gameWindow.close();
            }
        }
    }
   
    return 0;
}

Quote
"/usr/bin/make" -f nbproject/Makefile-Debug.mk QMAKE= SUBPROJECTS= .build-conf
make[1]: Entering directory `/c/Users/Mark/Desktop/smfl_practice'
"/usr/bin/make"  -f nbproject/Makefile-Debug.mk dist/Debug/MinGW-Windows/smfl_practice.exe
make[2]: Entering directory `/c/Users/Mark/Desktop/smfl_practice'
make[2]: Leaving directory `/c/Users/Mark/Desktop/smfl_practice'
make[1]: Leaving directory `/c/Users/Mark/Desktop/smfl_practice'
make[2]: *** No rule to make target `-lsfml-graphics-d', needed by `dist/Debug/MinGW-Windows/smfl_practice.exe'.  Stop.
make[1]: *** [.build-conf] Error 2
make: *** [.build-impl] Error 2

eXpl0it3r

  • SFML Team
  • Hero Member
  • *****
  • Posts: 10989
    • View Profile
    • development blog
    • Email
Re: Application not compiling with SFML 2.1
« Reply #1 on: December 05, 2013, 04:57:30 pm »
If you're just using MinGW how does that QMAKE get in there?
Also did you spend some time trying to solve the issue by googling the error, like: "No rule to make target"?

Something in your project settings/make file is not setup correctly. What are you using to write your code? ;)
Official FAQ: https://www.sfml-dev.org/faq.php
Official Discord Server: https://discord.gg/nr4X7Fh
——————————————————————
Dev Blog: https://duerrenberger.dev/blog/

Wilds

  • Newbie
  • *
  • Posts: 2
    • View Profile
Re: Application not compiling with SFML 2.1
« Reply #2 on: December 05, 2013, 09:47:15 pm »
I have searched for the error and I am using netbeans.

I managed to compile it but only by adding the libraries explicitly in netbeans.
If I add them as additional dependancies it wont work which seem to be weird.
« Last Edit: December 05, 2013, 10:01:49 pm by Wilds »

 

anything