Welcome, Guest. Please login or register. Did you miss your activation email?

Author Topic: DLL files are missing even though I copied them from SFMLInstallRoot/bin/  (Read 1825 times)

0 Members and 1 Guest are viewing this topic.

Rocker54

  • Newbie
  • *
  • Posts: 3
    • View Profile
Greetings everyone. First of all sorry for any eventual grammar mistake, English ain't my native tongue.
As the title says, I have copied all of the .dll files in the same folder where the .exe is compiled at, but for some reason I'm having this weird issue. If I run(or compile&run) the code from Code::Blocks I don't get nothing but this few seconds after I clicked the run button.
Process terminated with status -1073741571 (0 minute(s), 2 second(s))
If I directly run the file, I get 2 windows error messages telling me that the files "libgcc_s_seh-1.dll" and "libstcdc++-6.dll" are missing, in this same order I wrote them.
This is my code(I know it has many flaws related to optimization but I don't think they're the nature of the problem):
//author: steamcommunity/id/rocker54
//last edit: 7/7/2017 - EU time format

#include <SFML/Graphics.hpp>
#include <iostream>
#include <cstdlib>

using namespace std;

int main() {
    int x, y = 0;

    //Where the window should be created
    sf::RenderWindow window(sf::VideoMode(600, 600), "MEMEBOX - 7/7/2017");

    //Multidimensional array containing 600x600 pixels, as rectangles
    array<std::array<sf::RectangleShape, 599>, 599> rectangle;
    for(int i = 0; i <= 599; i++) {
        rectangle[i][1].setSize(sf::Vector2f(1,1));
    }
    window.setVerticalSyncEnabled(true);
    while (window.isOpen()) {
        sf::Event event;
        while (window.pollEvent(event)) {
            if (event.type == sf::Event::Closed)
                window.close();
        }
        for(x = 0; x <= 599; x++) {
            rectangle[x][0].setFillColor(sf::Color(rand() % 255,rand() % 255,rand() % 255,255));
            rectangle[x][0].setPosition(x,0);
        }
        for(y = 0; y <= 599; y++) {
            rectangle[0][y].setFillColor(sf::Color(rand() % 255,rand() % 255,rand() % 255,255));
            rectangle[0][y].setPosition(0,y);
        }
        window.clear();
        window.display();
    }
    return 0;
}
 

Laurent

  • Administrator
  • Hero Member
  • *****
  • Posts: 32504
    • View Profile
    • SFML's website
    • Email
These DLLs are from your compiler, not SFML.
Laurent Gomila - SFML developer

Rocker54

  • Newbie
  • *
  • Posts: 3
    • View Profile
But how are they missing though? I didn't do anything that would corrupt or delete these files.

Laurent

  • Administrator
  • Hero Member
  • *****
  • Posts: 32504
    • View Profile
    • SFML's website
    • Email
You didn't do anything wrong, you have to copy them from your compiler's bin directory to your executable directory, just like with SFML DLLs.
Laurent Gomila - SFML developer