sfml-tmxloader icon indicating copy to clipboard operation
sfml-tmxloader copied to clipboard

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

Open ghost opened this issue 11 years ago • 4 comments

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.

ghost avatar Aug 03 '14 06:08 ghost

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)

fallahn avatar Aug 03 '14 07:08 fallahn

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 avatar Aug 04 '14 10:08 ghost

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.

ghost avatar Aug 04 '14 10:08 ghost

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 avatar Aug 04 '14 10:08 fallahn