Skip to content

Building Error (SFML/Graphics/VertexArray.hpp not found) #19

New issue

Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.

By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.

Already on GitHub? Sign in to your account

Open
ghost opened this issue Aug 3, 2014 · 4 comments
Open

Building Error (SFML/Graphics/VertexArray.hpp not found) #19

ghost opened this issue Aug 3, 2014 · 4 comments

Comments

@ghost
Copy link

ghost commented Aug 3, 2014

Hello,

I'm trying to build sfml-tmxloader on Ubuntu 14.04. I pulled the source code from the git repository, created a build dir, set the SFML_ROOT to the path and ran "cmake ..". Here are the results:

-- Found SFML 2.1 in /home/hiram/Desenvolvimento/sfml/include
-- Found ZLIB: /usr/lib/x86_64-linux-gnu/libz.so (found version "1.2.8")
-- Found Box2D: /usr/lib/x86_64-linux-gnu/libBox2D.so
-- Configuring done
-- Generating done
-- Build files have been written to: /home/hiram/Desenvolvimento/sfml-tmxloader/build

Everything looks fine, but when I run "make" I get the following error message:

[ 14%] Building CXX object CMakeFiles/tmx-loader.dir/src/DebugShape.cpp.o
In file included from /home/hiram/Desenvolvimento/sfml-tmxloader/src/DebugShape.cpp:30:0:
/home/hiram/Desenvolvimento/sfml-tmxloader/include/tmx/DebugShape.h:33:41: fatal error: SFML/Graphics/VertexArray.hpp: Arquivo ou diretório não encontrado
#include <SFML/Graphics/VertexArray.hpp>
^
compilation terminated.
make[2]: ** [CMakeFiles/tmx-loader.dir/src/DebugShape.cpp.o] Erro 1
make[1]: ** [CMakeFiles/tmx-loader.dir/all] Erro 2
make: ** [all] Erro 2

It's basically saying that SFML/Graphics/VertexArray.hpp was not found (it's in portuguese), although CMake previously informed that it was able to find the SFML dir.

Any clues?

Thanks in advance.

@fallahn
Copy link
Owner

fallahn commented Aug 3, 2014

Linux isn't my strong point, but I think it may be because SFML is installed in a non-standard path. You could try updating the path with ldconfig, or run make install after building SFML to install it in the default location (I've tried the latter on Mint 16 and it works)

@ghost
Copy link
Author

ghost commented Aug 4, 2014

fallahn, thanks for your answer.

actually, it's strange that CMake was able to find it, but the generated Makefile wasn't. I'll keep investigating it.

BTW, by standard-path you mean /usr/local or /usr? I didn't compile SFML from source, I just download the Linux archive which's its libraries pre-compiled.

Do you think that make is complaining about the .hpp file could be related to the fact that .so libraries aren't being found for linking?

@ghost
Copy link
Author

ghost commented Aug 4, 2014

I was able to solve the issue by creating a symlink to my SFML include directory inside the sfml-tmxloader include dir.

It's seems that CMake or Make is not looking for the SFML include directory provided on SFML_ROOT.

@fallahn
Copy link
Owner

fallahn commented Aug 4, 2014

OK, thanks, I'll look into it when I have the time. Yes, by default directory I mean /usr/local or /usr - where LD normally searches. I'll leave this issue open for now.

@fallahn fallahn added Possible Bug and removed bug labels Feb 8, 2016
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Projects
None yet
Development

No branches or pull requests

1 participant