0
我正嘗試在mac os x上使用SFML編譯最小項目。我使用下面的命令:在mac os上使用SFML 2.1編譯最小項目x
g++ -o rj -framework SFML -lsfml-graphics -lsfml-audio -lsfml-window -lsfml-system main.cpp
與下面的代碼:
# include <SFML/Graphics.hpp>
int main()
{
sf::RenderWindow App(sf::VideoMode(800, 600, 32), "test");
return 0;
}
,並得到一個錯誤:
Undefined symbols for architecture x86_64:
"sf::String::String(char const*, std::__1::locale const&)", referenced from:
_main in main-15430b.o
ld: symbol(s) not found for architecture x86_64
我到底做錯了什麼?