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

Author Topic: Can't build simple app on OS X (SFML from master)  (Read 1476 times)

0 Members and 1 Guest are viewing this topic.

verbrannt

  • Newbie
  • *
  • Posts: 10
    • View Profile
Can't build simple app on OS X (SFML from master)
« 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..
« Last Edit: January 29, 2015, 02:45:32 pm by verbrannt »

Hiura

  • SFML Team
  • Hero Member
  • *****
  • Posts: 4321
    • View Profile
    • Email
Re: Can't build simple app on OS X (SFML from master)
« Reply #1 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.)
SFML / OS X developer

verbrannt

  • Newbie
  • *
  • Posts: 10
    • View Profile
Re: Can't build simple app on OS X (SFML from master)
« Reply #2 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!