【问题标题】:Compiling minimal project with SFML 2.1 on mac os x在 mac os x 上使用 SFML 2.1 编译最小项目
【发布时间】:2014-12-14 03:40:41
【问题描述】:

我正在尝试在 mac os x 上使用 SFML 编译最小项目。我正在使用以下命令:

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

我做错了什么?

【问题讨论】:

    标签: macos g++ sfml


    【解决方案1】:

    安装clang版本的库解决的问题。

    【讨论】:

      猜你喜欢
      • 2016-11-04
      • 1970-01-01
      • 1970-01-01
      • 1970-01-01
      • 1970-01-01
      • 1970-01-01
      • 1970-01-01
      • 2013-11-23
      • 2013-01-24
      相关资源
      最近更新 更多