The install instructions for each package are the same so I have provided just one example. SDL2_image-2.0.0 - bmp is built in but you need this for jpg, png etc. I quickly found that SDL needs several support libraries to be able to use images and fonts. You can run the "sdl2-config -cflags -libs" from a terminal and see what is being sent to the gcc compiler but when I tried to cut and past the same thing in a manual compile, it just would not work for me.) (Note: I tried for several days to manually provide the LIB and INC settings but I was unable to get anything to compile. This program is set up during the install process.Ĥ) - Compile - Use these commands for SDL1 or SDL2 compilesĬode: Select all gcc `sdl2-config -cflags -libs` -v -o myprog main.c > compile.log 2>&1 I eventually found out that SDL1 and SDL2 expect a custom made config program to pass the compiler library and include file information. I spent the next two days not getting anything to compile. It took about 50min to 1hr to do it's thing. All that is needed is to go to the unzip directory as root and run the following command './configure make make install'. The instructions are in the text file "install.txt". The really neat thing is the necessary Debian install files are provided and will setup automatically.Ģ) Install - Navigate to the Debian subdirectory. I was desperate and was not optimistic - but once you know one trick, it is REALLY EASY to get SDL2 running!ġ) Download - Get the linux generic release and unzip it in any directory. ![]() ![]() I could not get it working on my Raspbian (Weezy Debian) version. ![]() The only comprehnesive example I found was this utube video that includes links to a custom version that uses "CodeBlocks". Oddly (at least for Raspbian) there does not seem to be any issue with the installation. ![]() Neither the "synaptic" or "apt-get" repositories have the SDL2 library at the time of this writing. Even though SDL1, EGL, GLES, GLES2, VG are preloaded with the "Raspian" version of RPI that I am using, I was interested in scaling and rotation and wanted to checkout SDL2.Ī google search turns up almost nothing so I found myself blazing a trail. I have a new project that needed good 2D graphics.
0 Comments
Leave a Reply. |
AuthorWrite something about yourself. No need to be fancy, just an overview. ArchivesCategories |