sdl-2

Linking SDL2 - CLion - Ubuntu 16.04 - G++

∥☆過路亽.° 提交于 2021-01-28 11:09:05
问题 Background info As the title says, I am on Ubuntu 16.04 using CLion and G++, and I am unable to link SDL2. SDL2.h is found in the project at External Libraries/Header Search Paths/include/SDL2 . This seems to link to /usr/include/SDL2 . So, with the header file found, I can #include <SDL2/SDL.h> without any issues. Yet, when I try to make use of SDL2 with something like, SDL_Init( SDL_INIT_EVERYTHING ) , I get an undefined reference . If I compile from terminal with g++ main.cpp -lSDL2 -o

Linking SDL2 - CLion - Ubuntu 16.04 - G++

為{幸葍}努か 提交于 2021-01-28 11:03:10
问题 Background info As the title says, I am on Ubuntu 16.04 using CLion and G++, and I am unable to link SDL2. SDL2.h is found in the project at External Libraries/Header Search Paths/include/SDL2 . This seems to link to /usr/include/SDL2 . So, with the header file found, I can #include <SDL2/SDL.h> without any issues. Yet, when I try to make use of SDL2 with something like, SDL_Init( SDL_INIT_EVERYTHING ) , I get an undefined reference . If I compile from terminal with g++ main.cpp -lSDL2 -o

SDL2 main game loop

丶灬走出姿态 提交于 2021-01-27 07:08:37
问题 My question popped out while reading the tutorials on SDL2, on lazyfoo.net and the code is being copied from this page int main( int argc, char* args[] ) { //Start up SDL and create window if( !init() ) { printf( "Failed to initialize!\n" ); } else { //Load media if( !loadMedia() ) { printf( "Failed to load media!\n" ); } else { //Main loop flag bool quit = false; //Event handler SDL_Event e; //While application is running while( !quit ) { //Handle events on queue while( SDL_PollEvent( &e ) !

dyld: Library not loaded…reason image not found?

自作多情 提交于 2021-01-24 08:07:20
问题 I'm new to c++ and XCode, I'm using sdl2 to create a window but when i compile it, it crashes giving me a thread.I have included opengl.h , stdio.h and SDL2.h . There are questions about dlyd:library not loaded but their different. Error Message: dyld: Library not loaded: @rpath/SDL2.framework/Versions/A/SDL2 Referenced from: /Users/shayanrazavi/Library/Developer/Xcode/DerivedData/c++_code-bbdyozxqxxdxosbxuyhcrqobxrkd/Build/Products/Debug/c++ code Reason: image not found This is the code I

dyld: Library not loaded…reason image not found?

烂漫一生 提交于 2021-01-24 08:07:01
问题 I'm new to c++ and XCode, I'm using sdl2 to create a window but when i compile it, it crashes giving me a thread.I have included opengl.h , stdio.h and SDL2.h . There are questions about dlyd:library not loaded but their different. Error Message: dyld: Library not loaded: @rpath/SDL2.framework/Versions/A/SDL2 Referenced from: /Users/shayanrazavi/Library/Developer/Xcode/DerivedData/c++_code-bbdyozxqxxdxosbxuyhcrqobxrkd/Build/Products/Debug/c++ code Reason: image not found This is the code I

SDL2_image not found

做~自己de王妃 提交于 2021-01-22 07:41:02
问题 I am trying to compile the following code which has the headers: #include <SDL2/SDL.h> #include <SDL2_image/SDL_image.h> However after running the following makefile: g++ -std=c++11 src/main.cpp -lSDL2 -lSDL2_image I get the following error: fatal error: SDL2_image/SDL_image.h: No such file or directory #include <SDL2_image/SDL_image.h> Any suggestions? Not entirely sure about my installation of SDL_image. I am running this on Ubuntu. 回答1: This problem can be solved through installing libsdl2

SDL2_image not found

冷暖自知 提交于 2021-01-22 07:40:06
问题 I am trying to compile the following code which has the headers: #include <SDL2/SDL.h> #include <SDL2_image/SDL_image.h> However after running the following makefile: g++ -std=c++11 src/main.cpp -lSDL2 -lSDL2_image I get the following error: fatal error: SDL2_image/SDL_image.h: No such file or directory #include <SDL2_image/SDL_image.h> Any suggestions? Not entirely sure about my installation of SDL_image. I am running this on Ubuntu. 回答1: This problem can be solved through installing libsdl2

SDL2_image not found

僤鯓⒐⒋嵵緔 提交于 2021-01-22 07:38:05
问题 I am trying to compile the following code which has the headers: #include <SDL2/SDL.h> #include <SDL2_image/SDL_image.h> However after running the following makefile: g++ -std=c++11 src/main.cpp -lSDL2 -lSDL2_image I get the following error: fatal error: SDL2_image/SDL_image.h: No such file or directory #include <SDL2_image/SDL_image.h> Any suggestions? Not entirely sure about my installation of SDL_image. I am running this on Ubuntu. 回答1: This problem can be solved through installing libsdl2

SDL2_image not found

拥有回忆 提交于 2021-01-22 07:37:34
问题 I am trying to compile the following code which has the headers: #include <SDL2/SDL.h> #include <SDL2_image/SDL_image.h> However after running the following makefile: g++ -std=c++11 src/main.cpp -lSDL2 -lSDL2_image I get the following error: fatal error: SDL2_image/SDL_image.h: No such file or directory #include <SDL2_image/SDL_image.h> Any suggestions? Not entirely sure about my installation of SDL_image. I am running this on Ubuntu. 回答1: This problem can be solved through installing libsdl2

How can I get Kivy to use sdl2 on Linux?

醉酒当歌 提交于 2021-01-07 03:21:40
问题 I've got a problem where Kivy uses sdl2 on android, and works fine, but on linux it uses ffpyplayer, which doesn't. So I'd like to get Kivy to use sdl2 on linux too, however sdl2 doesn't seem to work at all on linux. $ KIVY_AUDIO=sdl2 python min_audio_example.py [INFO ] [Audio ] Providers: audio_sdl2 (audio_ffpyplayer ignored) [CRITICAL] [AudioSDL2 ] Unable to open mixer: b'No such audio device' Here's a minimal example with demonstrates the problem. #!/usr/bin/env python # works with: #