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

Show Posts

This section allows you to view all posts made by this member. Note that you can only see posts made in areas you currently have access to.


Messages - matz

Pages: [1]
1
General / Using SFML with mac OS 10.6.8 and g++
« on: March 01, 2013, 10:32:31 pm »
I'm trying to get SFML (64 bit) to work with g++ on my mac running 10.6.8. I'm avoiding xCode for a few reasons, first and foremost being I can't use c++11 with the current version of xcode on my mac (and I would have to play to upgrade, ugh).

That being said, I can't seem to figure out the process of installation/what to include on the command line in order to compile with g++. I tried following the normal 64 bit mac instructions for xcode, but after installing and using the following in g++:

g++ test.cpp -o test -framework sfml-window -framework sfml-graphics -framework sfml-system

I get:

Undefined symbols for architecture x86_64:
  "sf::Clock::GetElapsedTime() const", referenced from:
      _main in cc1VO6E6.o
  "sf::Sleep(float)", referenced from:
      _main in cc1VO6E6.o
ld: symbol(s) not found for architecture x86_64
collect2: error: ld returned 1 exit status

Has anyone had problems like this? I installed using the guide for xcode installation, but it doesn't seem like this would cause such an error. Suggestions?

EDIT: In case it is relevant, my code is just the example:

#include <SFML/System.hpp>
#include <iostream>

int main(){
        sf::Clock Clock;
        while(Clock.GetElapsedTime() < 5.f){
                std::cout << Clock.GetElapsedTime() << std::endl;
                sf::Sleep(0.5f);
        }
        return 0;
}

Pages: [1]