#How to link SFML static libraries to VS

6 messages · Page 1 of 1 (latest)

solid shuttle
#

I wanted to link SFML to my VS, I wanted to statically link it so that i could share the project without the recieving end needing to install SFML on thier computer. In the SFML tutorials page it says to add dependencies for all of the modules in addition dependencies. I am using latest version of VS, SFML and MinGW. How should the out put look like? Can someone please guide me through the process of linking these files. I have been trying but everything feels wrong.

swift ferryBOT
#

When your question is answered use !solved to mark the question as resolved.

Remember to ask specific questions, provide necessary details, and reduce your question to its simplest form. For tips on how to ask a good question use !howto ask.

solid shuttle
#

this is the code:-
#include <SFML/Graphics.hpp>

int main()
{
sf::RenderWindow window(sf::VideoMode({200, 200}), "SFML works!");
sf::CircleShape shape(100.f);
shape.setFillColor(sf::Color::Green);

while (window.isOpen())
{
    while (const std::optional event = window.pollEvent())
    {
        if (event->is<sf::Event::Closed>())
            window.close();
    }

    window.clear();
    window.draw(shape);
    window.display();
}

}

solid shuttle
#

I only have problems in adding the dependencies like how should I do that?

#

Also I have done every thing in the tutorial before the adding of '-s' suffix for static linking, please help me on what to do after this point.

solid shuttle
#

!solved