我尝试通过使用c ++在Windows的代码块中的Windows上安装sfml,方法是遵循其网站上的教程,也可以遵循网络上的教程,但即使这样做仍然不起作用,它也会发出此错误:
||=== Build: Debug in dasg (compiler: GNU GCC Compiler) ===|
ld.exe||cannot find -lsfml-graphics-s|
ld.exe||cannot find -lsfml-window-s|
ld.exe||cannot find -lsfml-system-s|
ld.exe||cannot find -lfreetype|
||error: ld returned 1 exit status|
||=== Build failed: 5 error(s), 0 warning(s) (0 minute(s), 0 second(s)) ===|
在我的编译器设置中,我在#define选项卡中写了“ SFML_STATIC”
在链接器设置中,我具有以下链接库
在“编译器”子选项卡的搜索目录中,我具有sfml / include文件夹的路径,而在链接器子文件夹中,我具有sfml / lib的路径
我做错了还是忘记了什么?
答案 0 :(得分:1)
首先检查您的库是否具有静态或动态版本。 在您的库路径中,检查/ lib文件夹中的文件。如果它们的扩展名为.so,例如libsfml-graphics.so。
继续阅读本教程-> https://www.sfml-dev.org/tutorials/2.5/start-cb.php