sdl_img | A simple image viewer based on SDL2 and stb_image
kandi X-RAY | sdl_img Summary
kandi X-RAY | sdl_img Summary
[Coverity Scan Build Status] A "simple" image viewer based on [stb_image.h] (with the suggested animated GIF API extension). It’s "simple" in that it would work fine as a drop in replacement for most people since all the normal/expected behavior is there, but it has tons of extra and unique features for power users, especially on Linux/Unix and if you’re comfortable with the terminal.
Support
Quality
Security
License
Reuse
Top functions reviewed by kandi - BETA
Currently covering the most popular Java, JavaScript and Python libraries. See a Sample of sdl_img
sdl_img Key Features
sdl_img Examples and Code Snippets
Community Discussions
Trending Discussions on sdl_img
QUESTION
I was having a problem getting one of my programs that uses SDL to compile so to fix it I reinstalled SDL2 and SDL2Image following this link: https://solarianprogrammer.com/2015/01/22/raspberry-pi-raspbian-getting-started-sdl-2/ I used this link before and have created windows and renderers successfully. Now the program compiles and runs but I get the error
...ANSWER
Answered 2020-Nov-25 at 19:55I reconfigured and installed, instead of configuring with:
QUESTION
Here is a simple SDL2 program that uses SDL_Image and runs just fine:
...ANSWER
Answered 2020-Nov-25 at 02:27You aren't passing the -I
to c++
in your makefile, when you compile the .cc
[to a .o
].
You only pass the flags on the c++
line used to link the .o
files.
One of the .o
targets needs sdl2-config
as well for its c++
command.
That's your immediate problem. However ...
When you do: sdl2-config --cflags
, it [partially] produces (e.g.) -I/usr/local/include/SDL2
, so a source .cc
file would work if it did: #include
.
But, your .cc
file does: #include
.
That may not work because it's at a different directory level [unless you add -I/usr/local/include
, which is sub-optimal because you're hardwiring the path].
If it's working, it's because the compiler assumes /usr/local/include
is a default part of the path for .h
files
UPDATE:
You'll have to excuse me I'm not very good at compiling yet. I tried adding
-I/usr/local/include/SDL2/SDL.h
in some different spots and it didn't change anything. Could you spell it out a bit more for me?
You do not want: -I/usr/local/include/SDL2/SDL.h
That points to a file.
You want: -I/usr/local/include/SDL2
That points to the directory.
But, you should do two things: (1) Fix your makefile and (2) Change the #include
directives in level.cc
to be compatible
Here's my adjustment for your makefile:
QUESTION
I'm trying to set up my Code::Blocks installation to work with the SDL2 graphics API. As the documentation suggests, once I had everything installed and specified correctly, I tried the
SDL_Init(SDL_INIT_EVERYTHING)
test, as:
ANSWER
Answered 2020-Mar-17 at 18:54UPDATE Your last edit shows the most important bit of the output (it's incidentally also the first part of the output):
Community Discussions, Code Snippets contain sources that include Stack Exchange Network
Vulnerabilities
No vulnerabilities reported
Install sdl_img
Support
Reuse Trending Solutions
Find, review, and download reusable Libraries, Code Snippets, Cloud APIs from over 650 million Knowledge Items
Find more librariesStay Updated
Subscribe to our newsletter for trending solutions and developer bootcamps
Share this Page