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

Author Topic: Error when starting SFML program  (Read 481 times)

0 Members and 1 Guest are viewing this topic.

SHF

  • Newbie
  • *
  • Posts: 4
    • View Profile
Error when starting SFML program
« on: August 06, 2022, 04:10:39 pm »
I am new to SFML. I connected SFML in Code::block and did everything as mentioned in https://www.sfml-dev.org/tutorials/2.5/start-cb.php. But when I start the application, the error "Main.exe program has stopped working". How to fix it?

eXpl0it3r

  • SFML Team
  • Hero Member
  • *****
  • Posts: 10332
    • View Profile
    • development blog
    • Email
Re: Error when starting SFML program
« Reply #1 on: August 08, 2022, 05:08:14 pm »
The error is not enough to find out what's going on.

Does it simply become unresponsive? Have you implemented an event loop?
Official FAQ: https://www.sfml-dev.org/faq.php
Official Discord Server: https://discord.gg/nr4X7Fh
——————————————————————
Dev Blog: https://dev.my-gate.net/

SHF

  • Newbie
  • *
  • Posts: 4
    • View Profile
Re: Error when starting SFML program
« Reply #2 on: August 16, 2022, 10:49:08 am »
At first, the error "The program cannot be started because libgcc_s_sjlj-1.dll is missing" and "The program cannot be started because libstdc++-6.dll is missing" then I threw these dlls from the Codeblocks\MinGw\bin folder into the project folder. After that an error appeared. When I closed the program, the console displayed "
Process returned -1073741819 (0xC0000005) execution time : 2.720 s
Press any key to continue."
« Last Edit: August 16, 2022, 12:32:45 pm by SHF »

eXpl0it3r

  • SFML Team
  • Hero Member
  • *****
  • Posts: 10332
    • View Profile
    • development blog
    • Email
Re: Error when starting SFML program
« Reply #3 on: August 17, 2022, 03:28:01 am »
That often indicates a mismatch of architecture, meaning that one DLL might be for the x86 architecture, while your application was built for the x64 architecture.

Did you download the matching SFML version?
Are you actually using the MinGW compiler shipped with Code::Blocks? If not, you might copy the libstdc++ and libgcc libraries from the compiler you're actually using
Official FAQ: https://www.sfml-dev.org/faq.php
Official Discord Server: https://discord.gg/nr4X7Fh
——————————————————————
Dev Blog: https://dev.my-gate.net/

SHF

  • Newbie
  • *
  • Posts: 4
    • View Profile
Re: Error when starting SFML program
« Reply #4 on: August 17, 2022, 09:06:04 am »
I installed SFML GCC 5.1.0 TDM (SJLJ) - Code::Blocks - 32-bit. And I used the codeblocks-17.12mingw-setup.exe installer. I have 32 bit OS
« Last Edit: August 17, 2022, 09:45:08 am by SHF »

SHF

  • Newbie
  • *
  • Posts: 4
    • View Profile
Re: Error when starting SFML program
« Reply #5 on: August 20, 2022, 08:42:20 am »
I used mingw which comes with codeblocks.