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

Author Topic: Weird compile error involving "/SFML/lib/libsfml-graphics-s.a"  (Read 1627 times)

0 Members and 1 Guest are viewing this topic.

Thaddeous

  • Newbie
  • *
  • Posts: 2
    • View Profile
Weird compile error involving "/SFML/lib/libsfml-graphics-s.a"
« on: January 17, 2014, 09:16:17 pm »
I'm using netbeans IDE 7.4 and CMake 2.8.12.1, and I'm using C++11
Here's my code:
/*
 * File:   main.cpp
 * Author: User
 *
 * Created on January 16, 2014, 11:47 PM
 */


#define SFML_STATIC
#include <SFML/Graphics.hpp>

using namespace sf;

/*
 *
 */

auto main () -> int
{
    RenderWindow window (VideoMode(200,200), "SFML Works!");
    CircleShape shape(100.f);
    shape.setFillColor(Color::Green);
   
    while(window.isOpen())
    {
        Event event;
        while(window.pollEvent(event))
            if(event.type == Event::Closed)
                window.close();
        window.clear();
        window.draw(shape);
        window.display();
    }
    return 0;
}

 
And here is my compile error:
Quote
"/C/MinGW/msys/1.0/bin/make.exe" -f nbproject/Makefile-Release.mk QMAKE= SUBPROJECTS= .build-conf
make.exe[1]: Entering directory `/c/Users/User/Documents/NetBeansProjects/CppApplication_1'
"/C/MinGW/msys/1.0/bin/make.exe"  -f nbproject/Makefile-Release.mk dist/Release/MinGW-Windows/cppapplication_1.exe
make.exe[2]: Entering directory `/c/Users/User/Documents/NetBeansProjects/CppApplication_1'
make.exe[2]: *** No rule to make target `../../../../../Program Files \(x86\)/SFML/lib/libsfml-graphics-s.a', needed by `dist/Release/MinGW-Windows/cppapplication_1.exe'.  Stop.
make.exe[2]: Leaving directory `/c/Users/User/Documents/NetBeansProjects/CppApplication_1'
make.exe[1]: *** [.build-conf] Error 2
make.exe[1]: Leaving directory `/c/Users/User/Documents/NetBeansProjects/CppApplication_1'
make.exe": *** [.build-impl] Error 2


BUILD FAILED (exit value 2, total time: 2s)

How do i make this exe file? the one here:
Quote
make.exe[2]: *** No rule to make target `../../../../../Program Files \(x86\)/SFML/lib/libsfml-graphics-s.a', needed by `dist/Release/MinGW-Windows/cppapplication_1.exe'.  Stop.
It should be stated that Im new to SFML and CMake..

eXpl0it3r

  • SFML Team
  • Hero Member
  • *****
  • Posts: 10821
    • View Profile
    • development blog
    • Email
AW: Weird compile error involving "/SFML/lib/libsfml-graphics-s.a"
« Reply #1 on: January 17, 2014, 10:25:27 pm »
If you choose a library for which we don't have a tutorial here, it's wise to first learn how the IDE works, whers you need to add the settings (SFML_STATIC does not belong into the source code) and how it interacts with the compiler.

To me it seems you haven't set the project up correctly and the linker can't find the SFML libraries.
Official FAQ: https://www.sfml-dev.org/faq.php
Official Discord Server: https://discord.gg/nr4X7Fh
——————————————————————
Dev Blog: https://duerrenberger.dev/blog/

Thaddeous

  • Newbie
  • *
  • Posts: 2
    • View Profile
Re: Weird compile error involving "/SFML/lib/libsfml-graphics-s.a"
« Reply #2 on: January 19, 2014, 01:20:08 am »
Yep I just had to play with the properties of the project to get it working. thank you!