Fedora 27 代码块中带有 Thor 的 SFML

SFML with Thor in Fedora 27 Codeblocks

我正在尝试使用 C++ 中的代码块使用 SFML 2.4 和 Thor 2.0 开始一个简单的游戏。 我正在动态链接库。

对于链接器设置选项卡上的发布选项

sfml-audio
sfml-graphics
sfml-window
sfml-system
thor

在搜索目录 -> 编译器中:

/usr/include

在搜索目录 -> 链接器中:

/usr/lib

游戏编译良好但抛出一些警告:

||warning: libsfml-graphics.so.2.3, needed by /usr/lib/libthor.so, not found (try using -rpath or -rpath-link)|
||warning: libsfml-window.so.2.3, needed by /usr/lib/libthor.so, not found (try using -rpath or -rpath-link)|
||warning: libsfml-system.so.2.3, needed by /usr/lib/libthor.so, not found (try using -rpath or -rpath-link)|

当我 运行 它 window 打开时说:

error while loading shared libraries: libsfml-graphics.so.2.3: cannot open shared object file: No such file or directory

我猜 Thor 正在搜索 SFML 的旧版本。知道我该如何纠正吗?

注意:在/usr/lib/中是否有所有扩展名为 2.4.2 和 2.4 的 libsfml 文件。不是 2.3

您使用的 Thor 版本被编译为与 SFML 2.3 一起使用,而不是 2.4。您需要获取 Thor 源代码 from here 并自行编译,或者获取 SFML 2.3 库。