SFML community forums

Help => General => Topic started by: verbrannt on January 29, 2015, 02:19:54 pm

Title: Can't build simple app on OS X (SFML from master)
Post by: verbrannt on January 29, 2015, 02:19:54 pm
Hi!

SFML compiled from sources (github master) using clang and libc++ (may be i do it wrong, but simple app with window compiles succefull).
When i try to compile anything with code:

sf::VertexArray triangle(sf::Triangles, 3);

ive get error:

Undefined symbols for architecture x86_64:
  "sf::VertexArray::VertexArray(sf::PrimitiveType, unsigned int)", referenced from:
      renderingThread(sf::RenderWindow*) in main.cpp.o
ld: symbol(s) not found for architecture x86_64
clang: error: linker command failed with exit code 1 (use -v to see invocation)
make[2]: *** [Engine] Error 1
make[1]: *** [CMakeFiles/Engine.dir/all] Error 2
make: *** [all] Error 2

Compiled with CMake:

set(CMAKE_CXX_FLAGS "${CMAKE_CXX_FLAGS} -std=c++11 -Wall -stdlib=libc++")

It seems like some SFML parts compiled with 32bit arch instead of 64..
Title: Re: Can't build simple app on OS X (SFML from master)
Post by: Hiura on January 29, 2015, 02:47:01 pm
Your binaries don't match your header. Check your install again. (This function was changed not so long ago. (https://github.com/SFML/SFML/commit/1cfa5c6f1d5ace7354d255e3870a2bdf63d143c6))
Title: Re: Can't build simple app on OS X (SFML from master)
Post by: verbrannt on January 29, 2015, 03:00:42 pm
oh of course
in first time i use dylibs instead of frameworks, and copy headers from include/ dir to /usr/local/include/
now i use frameworks, but compiler still look into /usr/local/include, which contain wrong headers =)

thank you!