"Hello world" with SDL - No output on run

Answered

Hello, I am new to CLion and CMake and was trying to set up SDL2. I am having a problem that the "Run" button does not output anything with a simple hello world, this only happens when I add the final line in CMakeLists.txt (target_link_libraries).

Another thing which I don't understand is that the "Debug" button, outputs hello world just fine.

 

Problem 2 - No option to run when including SDL2:

Here is my main.cpp without SDL included, the debug button outputs Hello World.

Now, here is what happens when i include SDL2:

The run button went away, here is what happens when I try to run/debug the project:

Any help is appreciated, thanks.

1
1 comment

Hello!

  1. It seems to be https://youtrack.jetbrains.com/issue/CPP-13868. Feel free to comment or upvote the issue in order to get updates. See https://intellij-support.jetbrains.com/hc/en-us/articles/207241135-How-to-follow-YouTrack-issues-and-receive-notifications if you are not familiar with YouTrack.
  2. Doesn't look like a CLion-related issue. Please try building this exact CMake project outside CLion (in the Command Prompt, for example) - probably the building process will fail there too.
0

Please sign in to leave a comment.