首页 > 解决方案 > sfml dosen't want to link in visual studio 2019

问题描述

I want to make a new project that uses sfml . I added it in the additional include and additional library like normal, in the linker input i added sfml-graphics-d.lib but it can't open it, the library is in drive D and visual studio dosen't seem to complain in the editor, how can i resolve this?

Include Directory Additional Dependencies Library directory

The only code is just that:

#include <SFML/Graphics.hpp>

int main()
{
    srand(time(0));

    RenderWindow window(VideoMode(320, 480)

    return 0;
}

标签: c++sfmlvisual-studio-2019

解决方案


如果动态链接,则需要在项目中包含 sfml bin 文件夹中的 .dll,一定要复制正确的,有 2 种类型,1 用于调试 1 用于发布。将它们复制到您的项目调试/发布文件夹中


推荐阅读