- what version of SFML are you using:
2.0 latest snapshot
- what settings did you use the compile SFML (if you did it yourself):
I followed the tutorial, using CMake and enabling c++11 features using the clang compiler and setting -stdlib=libc++. I'd tried this method with making frameworks, dylibs and .a files. And I have it set to install the xcode template
- how did you install SFML:
I ran sudo make install on the generated makefiles from CMake which should put the compiled libraries in library/frameworks or /usr/local/include and /usr/local/lib
- what version of the template are you using:
I'm using the template version it installed.
- what are the project settings:
For framework, I added the SFML.framework to the project, set it in the Link Libraries, and added "/Library/Frameworks" to the Framework Search Path
- the current compilation errors (btw, you can copy and past them instead of taking a screenshot):
Ld "/Users/matthew/Library/Developer/Xcode/DerivedData/Game_Server-asxlnfbqgoemzmfmlkbbnxgkxhue/Build/Products/Debug/Game Server.app/Contents/MacOS/Game Server" normal x86_64
cd "/Users/matthew/Dropbox/Cross Platform Code/Game Server Xcode"
setenv MACOSX_DEPLOYMENT_TARGET 10.8
/Applications/Xcode.app/Contents/Developer/Toolchains/XcodeDefault.xctoolchain/usr/bin/clang++ -arch x86_64 -isysroot /Applications/Xcode.app/Contents/Developer/Platforms/MacOSX.platform/Developer/SDKs/MacOSX10.8.sdk -L/Users/matthew/Library/Developer/Xcode/DerivedData/Game_Server-asxlnfbqgoemzmfmlkbbnxgkxhue/Build/Products/Debug -F/Users/matthew/Library/Developer/Xcode/DerivedData/Game_Server-asxlnfbqgoemzmfmlkbbnxgkxhue/Build/Products/Debug -F/Library/Frameworks -filelist "/Users/matthew/Library/Developer/Xcode/DerivedData/Game_Server-asxlnfbqgoemzmfmlkbbnxgkxhue/Build/Intermediates/Game Server.build/Debug/Game Server.build/Objects-normal/x86_64/Game Server.LinkFileList" -mmacosx-version-min=10.8 -stdlib=libc++ -fobjc-link-runtime -framework Foundation -framework SFML -o "/Users/matthew/Library/Developer/Xcode/DerivedData/Game_Server-asxlnfbqgoemzmfmlkbbnxgkxhue/Build/Products/Debug/Game Server.app/Contents/MacOS/Game Server"
Undefined symbols for architecture x86_64:
"sf::TcpListener::close()", referenced from:
TcpServer::stop() in TCPServer.o
"sf::TcpListener::accept(sf::TcpSocket&)", referenced from:
TcpServer::runListener() in TCPServer.o
"sf::TcpListener::listen(unsigned short)", referenced from:
TcpServer::runListener() in TCPServer.o
"sf::TcpListener::TcpListener()", referenced from:
TcpServer::runListener() in TCPServer.o
"sf::RenderStates::Default", referenced from:
ServerController::draw(sf::RenderWindow*) in ServerController.o
"sf::RenderTarget::draw(sf::Drawable const&, sf::RenderStates const&)", referenced from:
ServerController::draw(sf::RenderWindow*) in ServerController.o
"sf::RenderTarget::clear(sf::Color const&)", referenced from:
_main in main.o
"sf::RenderWindow::RenderWindow(sf::VideoMode, std::__1::basic_string<char, std::__1::char_traits<char>, std::__1::allocator<char> > const&, unsigned int, sf::ContextSettings const&)", referenced from:
_main in main.o
"sf::RenderWindow::~RenderWindow()", referenced from:
_main in main.o
"sf::microseconds(long long)", referenced from:
TcpServer::runSender() in TCPServer.o
UdpServer::runListener() in UDPServer.o
UdpServer::runSender() in UDPServer.o
"sf::Transformable::setPosition(float, float)", referenced from:
ServerController::ServerController() in ServerController.o
"sf::SocketSelector::add(sf::Socket&)", referenced from:
TcpServer::runListener() in TCPServer.o
"sf::SocketSelector::wait(sf::Time)", referenced from:
TcpServer::runListener() in TCPServer.o
"sf::SocketSelector::remove(sf::Socket&)", referenced from:
TcpServer::runListener() in TCPServer.o
"sf::SocketSelector::SocketSelector()", referenced from:
TcpServer::runListener() in TCPServer.o
"sf::Text::setColor(sf::Color const&)", referenced from:
ServerController::ServerController() in ServerController.o
"sf::Text::setString(sf::String const&)", referenced from:
ServerController::draw(sf::RenderWindow*) in ServerController.o
"sf::Text::Text()", referenced from:
ServerController::ServerController() in ServerController.o
"sf::Time::Zero", referenced from:
TcpServer::runListener() in TCPServer.o
"sf::Clock::restart()", referenced from:
_main in main.o
ServerController::ServerController() in ServerController.o
ServerController::logic(float) in ServerController.o
"sf::Clock::Clock()", referenced from:
_main in main.o
ServerController::ServerController() in ServerController.o
"sf::Color::White", referenced from:
ServerController::ServerController() in ServerController.o
"sf::Color::Color(unsigned char, unsigned char, unsigned char, unsigned char)", referenced from:
_main in main.o
"sf::sleep(sf::Time)", referenced from:
_main in main.o
TcpServer::runSender() in TCPServer.o
UdpServer::runListener() in UDPServer.o
UdpServer::runSender() in UDPServer.o
"sf::Packet::append(void const*, unsigned long)", referenced from:
ZipPacket::onReceive(void const*, unsigned long) in PacketID.o
ZipPacket::onReceive(void const*, unsigned long) in TCPServer.o
ZipPacket::onReceive(void const*, unsigned long) in UDPServer.o
"sf::Packet::Packet()", referenced from:
PacketID::Server::gpClientID(Connection*) in PacketID.o
PacketID::Server::gpUdpConnected() in PacketID.o
PacketID::Server::gpMap(Map*) in PacketID.o
PacketID::Server::gpClearBlocks() in PacketID.o
PacketID::Server::gpTimeLeft(long) in PacketID.o
PacketID::Server::gpBlock(Block*) in PacketID.o
PacketID::Server::gpCreateCannon(Cannon*, float, float) in PacketID.o
...
"sf::Packet::~Packet()", referenced from:
ZipPacket::~ZipPacket() in PacketID.o
ZipPacket::~ZipPacket() in PacketID.o
ZipPacket::~ZipPacket() in TCPServer.o
ZipPacket::~ZipPacket() in TCPServer.o
ZipPacket::~ZipPacket() in UDPServer.o
ZipPacket::~ZipPacket() in UDPServer.o
"sf::Packet::operator<<(std::__1::basic_string<char, std::__1::char_traits<char>, std::__1::allocator<char> > const&)", referenced from:
PacketID::Server::gpCreatePlayer(Player*) in PacketID.o
"sf::Packet::operator<<(bool)", referenced from:
PacketID::Server::gpPlayerInAirUpdate(Player*) in PacketID.o
"sf::Packet::operator<<(float)", referenced from:
PacketID::Server::gpBlock(Block*) in PacketID.o
PacketID::Server::gpCreateCannon(Cannon*, float, float) in PacketID.o
PacketID::Server::gpCreatePlayer(Player*) in PacketID.o
PacketID::Server::gpCannonPosUpdate(Cannon*) in PacketID.o
PacketID::Server::gpPlayerPosUpdate(Player*) in PacketID.o
"sf::Packet::operator<<(int)", referenced from:
PacketID::Server::gpCreatePlayer(Player*) in PacketID.o
"sf::Packet::operator<<(unsigned int)", referenced from:
PacketID::Server::gpClientID(Connection*) in PacketID.o
PacketID::Server::gpTimeLeft(long) in PacketID.o
PacketID::Server::gpBlock(Block*) in PacketID.o
PacketID::Server::gpCreateCannon(Cannon*, float, float) in PacketID.o
PacketID::Server::gpCreatePlayer(Player*) in PacketID.o
PacketID::Server::gpCannonPosUpdate(Cannon*) in PacketID.o
PacketID::Server::gpPlayerPosUpdate(Player*) in PacketID.o
...
"sf::Packet::operator<<(unsigned short)", referenced from:
PacketID::Server::gpClientID(Connection*) in PacketID.o
PacketID::Server::gpUdpConnected() in PacketID.o
PacketID::Server::gpMap(Map*) in PacketID.o
PacketID::Server::gpClearBlocks() in PacketID.o
PacketID::Server::gpTimeLeft(long) in PacketID.o
PacketID::Server::gpBlock(Block*) in PacketID.o
PacketID::Server::gpCreateCannon(Cannon*, float, float) in PacketID.o
...
"sf::Packet::operator>>(std::__1::basic_string<char, std::__1::char_traits<char>, std::__1::allocator<char> >&)", referenced from:
PacketID::Client::ppLogin(ZipPacket*, Connection*, Map*, ServerController*) in PacketID.o
"sf::Packet::operator>>(bool&)", referenced from:
PacketID::Client::ppRightArrow(ZipPacket*, Connection*) in PacketID.o
PacketID::Client::ppLeftArrow(ZipPacket*, Connection*) in PacketID.o
PacketID::Client::ppUpArrow(ZipPacket*, Connection*) in PacketID.o
PacketID::Client::ppDownArrow(ZipPacket*, Connection*) in PacketID.o
PacketID::Client::ppSpaceBar(ZipPacket*, Connection*) in PacketID.o
PacketID::Client::ppMouse(ZipPacket*, Connection*) in PacketID.o
"sf::Packet::operator>>(float&)", referenced from:
PacketID::Client::ppMousePos(ZipPacket*, Connection*) in PacketID.o
"sf::Packet::operator>>(unsigned int&)", referenced from:
Networking::processUDPMessage(ZipPacket*, sf::IpAddress, unsigned short) in Networking.o
"sf::Packet::operator>>(unsigned short&)", referenced from:
Networking::processUDPMessage(ZipPacket*, sf::IpAddress, unsigned short) in Networking.o
PacketID::Client::ppUdpPort(ZipPacket*, Connection*, Networking*) in PacketID.o
PacketID::Client::ppUdpConnect(ZipPacket*, Connection*, Networking*) in PacketID.o
ServerController::onMessage(Connection*, ZipPacket*) in ServerController.o
"sf::String::String(std::__1::basic_string<char, std::__1::char_traits<char>, std::__1::allocator<char> > const&, std::__1::locale const&)", referenced from:
ServerController::draw(sf::RenderWindow*) in ServerController.o
"sf::Thread::launch()", referenced from:
TcpServer::start() in TCPServer.o
UdpServer::start() in UDPServer.o
"sf::Window::close()", referenced from:
_main in main.o
"sf::Window::display()", referenced from:
_main in main.o
"sf::Window::pollEvent(sf::Event&)", referenced from:
_main in main.o
"sf::seconds(float)", referenced from:
_main in main.o
"sf::IpAddress::IpAddress(std::__1::basic_string<char, std::__1::char_traits<char>, std::__1::allocator<char> > const&)", referenced from:
Connection::setUdpAddress(sf::IpAddress) in Connection.o
"sf::IpAddress::IpAddress()", referenced from:
UdpServer::runListener() in UDPServer.o
"sf::TcpSocket::disconnect()", referenced from:
TcpServer::stop() in TCPServer.o
"sf::TcpSocket::send(sf::Packet&)", referenced from:
TcpServer::runSender() in TCPServer.o
"sf::TcpSocket::receive(sf::Packet&)", referenced from:
TcpServer::runListener() in TCPServer.o
"sf::TcpSocket::TcpSocket()", referenced from:
TcpServer::runListener() in TCPServer.o
"sf::UdpSocket::bind(unsigned short)", referenced from:
UdpServer::runListener() in UDPServer.o
"sf::UdpSocket::send(sf::Packet&, sf::IpAddress const&, unsigned short)", referenced from:
UdpServer::runSender() in UDPServer.o
"sf::UdpSocket::unbind()", referenced from:
UdpServer::stop() in UDPServer.o
"sf::UdpSocket::receive(sf::Packet&, sf::IpAddress&, unsigned short&)", referenced from:
UdpServer::runListener() in UDPServer.o
"sf::UdpSocket::UdpSocket()", referenced from:
UdpServer::start() in UDPServer.o
"sf::VideoMode::VideoMode(unsigned int, unsigned int, unsigned int)", referenced from:
_main in main.o
"sf::SocketSelector::isReady(sf::Socket&) const", referenced from:
TcpServer::runListener() in TCPServer.o
"sf::Time::asMilliseconds() const", referenced from:
ServerController::logic(float) in ServerController.o
ServerController::getMapTimeLeft() in ServerController.o
"sf::Time::asSeconds() const", referenced from:
_main in main.o
"sf::Clock::getElapsedTime() const", referenced from:
ServerController::logic(float) in ServerController.o
ServerController::getMapTimeLeft() in ServerController.o
"sf::Packet::getDataSize() const", referenced from:
ZipPacket::onSend(unsigned long&) in PacketID.o
ZipPacket::onSend(unsigned long&) in TCPServer.o
ZipPacket::onSend(unsigned long&) in UDPServer.o
"sf::Packet::getData() const", referenced from:
ZipPacket::onSend(unsigned long&) in PacketID.o
ZipPacket::onSend(unsigned long&) in TCPServer.o
ZipPacket::onSend(unsigned long&) in UDPServer.o
"sf::Window::isOpen() const", referenced from:
_main in main.o
"sf::IpAddress::toString() const", referenced from:
Connection::setUdpAddress(sf::IpAddress) in Connection.o
"sf::IpAddress::toInteger() const", referenced from:
Networking::processTCPDisconnection(sf::TcpSocket*) in Networking.o
Networking::processUDPMessage(ZipPacket*, sf::IpAddress, unsigned short) in Networking.o
"sf::TcpSocket::getRemoteAddress() const", referenced from:
Networking::processTCPDisconnection(sf::TcpSocket*) in Networking.o
"typeinfo for sf::Packet", referenced from:
typeinfo for ZipPacket in PacketID.o
typeinfo for ZipPacket in TCPServer.o
typeinfo for ZipPacket in UDPServer.o
ld: symbol(s) not found for architecture x86_64
clang: error: linker command failed with exit code 1 (use -v to see invocation)
- and, of course, any other information that you think is relevant here:
When I try to compile it for 32bit instead of 64 bit, it gives all the same errors and an extra warning:
ld: warning: ignoring file /Library/Frameworks/SFML.framework/SFML, file was built for unsupported file format ( 0xcf 0xfa 0xed 0xfe 0x 7 0x 0 0x 0 0x 1 0x 3 0x 0 0x 0 0x 0 0x 6 0x 0 0x 0 0x 0 ) which is not the architecture being linked (i386): /Library/Frameworks/SFML.framework/SFML