close
Skip to main content
Image

r/sfml


Beginner Dev Road
Beginner Dev Road

So I am a beginner at programming entirely while i do know languages like C, C++, Java, Python, HTML/CSS but I understand programing is not just knowing languages.

I do not have a traditional learning environment (colleges or academies). I am doing it out of passion for Computers and games, i have tried learning DS/ML, web development, ethical hacking but none felt interesting or engaging.

I am a beginner learning SFML and willing to make a 2D game down the road. Usually when stuff gets tough or confusing i quit or lose interest progressively but this time I felt like joining a community might help so I Really Really wish for u to formulate a roadmap for me.

Thanks.


With Shopify, Emma turned her passion for coffee into a business. Start your free trial today.
media poster



SFML not working in CLion (exit code -1073741511 0xC0000139)
SFML not working in CLion (exit code -1073741511 0xC0000139)

So, I installed SFML using the mingw-x64-dynamic thing because I am trying to learn C++ and it only kind of works. CLion allows me to build it and run it with no errors, but when I run it in CLion it doesnt do anything at all and just prints out:

C:\Users\vjste\OneDrive\Desktop\C_Learning\CPP\cmake-build-debug\CPP.exe

Process finished with exit code -1073741511 (0xC0000139)

But when I run the actual file (`C:\Users\vjste\OneDrive\Desktop\C_Learning\CPP\cmake-build-debug\CPP.exe`) it runs perfectly fine and shows the window and everything.

This is a big problem for me because I want to be able to run my projects using just CLion and not having to build it then open explorer and then run the exe every single time since that is annoying.

### Here is literally everything I have checked so far:

In `C:\Users\vjste\OneDrive\Desktop\C_Learning\CPP\cmake-build-debug` the SFML DLLs do exist: `sfml-graphics-3`, `sfml-system-3`, `sfml-window-3`**, etc..**

My `CMakeListTexts.txt` say the following:

cmake_minimum_required(VERSION 3.20)

project(CPP)

set(CMAKE_CXX_STANDARD 17)

set(CMAKE_RUNTIME_OUTPUT_DIRECTORY ${CMAKE_BINARY_DIR})

find_package(SFML COMPONENTS Graphics Window System REQUIRED)

add_executable(CPP main.cpp)

target_link_libraries(CPP PRIVATE

SFML::Graphics

SFML::Window

SFML::System

)

My CMake options are:

-DCMAKE_TOOLCHAIN_FILE=C:/WINDOWS/vcpkg/scripts/buildsystems/vcpkg.cmake

-DVCPKG_TARGET_TRIPLET=x64-mingw-dynamic

-DVCPKG_APPLOCAL_DEPS=ON

-DCMAKE_RUNTIME_OUTPUT_DIRECTORY=C:/Users/vjste/C_Learning/CPP/cmake-build-debug

My environment variables are: `PATH=C:\Program Files\JetBrains\CLion 2026.1.1\bin\mingw\bin` and inside of there the following DLLs do exist inside of that folder:

libstdc++-6.dll

libgcc_s_seh-1.dll

libwinpthread-1.dll

I'm not exactly sure why all of these settings matter and what they do. These are just things the internet told me to do that didnt work, but if someone could actually see all this and know what I could do to fix things then that would be very nice.

Also, just to clarify, using regular C++ stuff does work. It just starts acting weird when I use the SFML stuff.