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
我到底做错了什么?