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

Author Topic: Trying to use SFML with VS Code : exited with code -1073741515 (0xc0000135)  (Read 3646 times)

0 Members and 1 Guest are viewing this topic.

electo

  • Newbie
  • *
  • Posts: 3
    • View Profile
Hello,

I was trying to install and use SFML on VS Code, i managed to compile it but when i run it i have these errors:

The thread 8324 has exited with code -1073741515 (0xc0000135).
The thread 4032 has exited with code -1073741515 (0xc0000135).
The program '[11796] a.exe' has exited with code -1073741515 (0xc0000135).

I have installed SFML 2.5.1 (SEH) 64 bit
And for the compiler i have : g++ (x86_64-posix-seh-rev0, Built by MinGW-W64 project) 7.3.0
I have installed MinGW from the download page on the SFML site.

I've tried with the 32 bit versions but it does the same error.

I have this basic code:

#include <SFML/Window.hpp>

int main()
{
    sf::Window window(sf::VideoMode(800, 600), "My window");

    while (window.isOpen())
    {
        sf::Event event;
        while (window.pollEvent(event))
        {
            if (event.type == sf::Event::Closed)
                window.close();
        }
    }
    return (0);
}

but it crashes instantly.

When i delete all the SFML code everythings works normally.

Can someone help me? I've searched for a while now but i can't get it to work...

EDIT:
I tried to download the source and to compile SFML but still the same error...
« Last Edit: December 20, 2018, 08:25:37 pm by electo »

Laurent

  • Administrator
  • Hero Member
  • *****
  • Posts: 32498
    • View Profile
    • SFML's website
    • Email
Did you copy the SFML DLLs next to the executable? You can also use a debugger, to get more detailed information than an error code.
Laurent Gomila - SFML developer

electo

  • Newbie
  • *
  • Posts: 3
    • View Profile
"Did you copy the SFML DLLs next to the executable?"

I tried it but it didn't change anything (i included the path of the libs and when he compiles he finds them so i don't think the problem comes from here)


"You can also use a debugger, to get more detailed information than an error code."

I just started using VS Code so i'm not sure but i think i'm already using a debugger

eXpl0it3r

  • SFML Team
  • Hero Member
  • *****
  • Posts: 11032
    • View Profile
    • development blog
    • Email
The error means, according to a 30s Google search, that it can't find a specific DLL. Navigate to the exe in Explorer and double click the executable, the triggered message box will tell you which DLL can't be found exactly. ;)
Official FAQ: https://www.sfml-dev.org/faq.php
Official Discord Server: https://discord.gg/nr4X7Fh
——————————————————————
Dev Blog: https://duerrenberger.dev/blog/

electo

  • Newbie
  • *
  • Posts: 3
    • View Profile
Ok, so either i'm very bad at using google because i searched this a lot or either you're a google magician.

Yes you were right i clicked on the .exe and he said that he couldn't find 2 of the .dll
So i just placed them next to the .exe an it works fine.
I already tried this before but with the .a so of course it didn't work.
I feel so dumb right now... :-X

Thank you so much! :D

eXpl0it3r

  • SFML Team
  • Hero Member
  • *****
  • Posts: 11032
    • View Profile
    • development blog
    • Email
Not really a magician, I just Googled the error hex code and clicked on some links: https://www.google.ch/search?q=0xc0000135

(tbf I already kind of knew that it must be this issue, but I just wanted to recheck)

Glad you figured it out :)
Official FAQ: https://www.sfml-dev.org/faq.php
Official Discord Server: https://discord.gg/nr4X7Fh
——————————————————————
Dev Blog: https://duerrenberger.dev/blog/