M
M
Mikhail Markov2015-01-18 11:00:15
C++ / C#
Mikhail Markov, 2015-01-18 11:00:15

Why doesn't Netbeans on Ubuntu see the library when compiling?

I connected the SFML-2.2 library to Netbeans, and it seems to be installed correctly, because when typing the code, it suggests the path to it. Here:
59e20ba576ff43248589d66990a550c9.png
Here is the application code (the code is not mine and definitely working):

#include <cstdlib>
#include "SFML-2.2/include/SFML/Graphics.hpp"
#include "SFML-2.2/include/SFML/"

using namespace std;

int main() {
    RenderWindow Window( VideoMode(200, 200), "Test");
    return 0;
}

And here is the error log:
"/usr/bin/make" -f nbproject/Makefile-Debug.mk QMAKE= SUBPROJECTS= .build-conf
make[1]: Entering directory `/home/markov/NetBeansProjects/CppApplication_1'
"/ usr/bin/make" -f nbproject/Makefile-Debug.mk dist/Debug/GNU-Linux-x86/cppapplication_1
make[2]: Enter directory `/home/markov/NetBeansProjects/CppApplication_1'
mkdir -p build/Debug /GNU-Linux-x86
rm -f "build/Debug/GNU-Linux-x86/main.od"
g++-4.6 -c -g -MMD -MP -MF "build/Debug/GNU-Linux-x86/main.od" od" -o build/Debug/GNU-Linux-x86/main.o main.cpp
In file included from main.cpp:9:0:
SFML-2.2/include/SFML/Graphics.hpp:32:27: fatal error : SFML/Window.hpp: No such file or directory
compilation aborted.
make[2]: *** [build/Debug/GNU-Linux-x86/main.o] Error 1
make[2]: Leaving directory `/home/markov/NetBeansProjects/CppApplication_1'
make[1]: ** * [.build-conf] Error 2
make[1]: Exiting directory `/home/markov/NetBeansProjects/CppApplication_1'
make: *** [.build-impl] Error 2
BUILD FAILED (exit value 2,, total time : 626ms)

Answer the question

In order to leave comments, you need to log in

1 answer(s)
P
pixik, 2015-01-28
@marperia

Try like this

#include "./SFML-2.2/include/SFML/Graphics.hpp"
#include "./SFML-2.2/include/SFML/"

Didn't find what you were looking for?

Ask your question

Ask a Question

731 491 924 answers to any question