Here’s another “How To” tutorial! In this post, I will guide you through a step-by-step procedure to setup SDL in CodeBlocks. Code::Blocks is the most widely used IDE for the compilation of C, C++, etc. programming languages. But the default setting of CodeBlocks doesn’t include SDL setting. As most of the projects use media applications, setup of SDL is essential in Code::Blocks IDE.
Evabeat melody sauce vst crack. What is SDL?
Local Environment Setup. If you are still willing to set up your environment for C, you need to have the following two softwares on your computer. This will be used to type your program. Examples of few editors include Windows Notepad, OS Edit command, Brief, Epsilon, EMACS, and vim or vi.
But some files didn't show key even after they were refreshed. Check consistency traktor pro 2.
Whenever a low level access is to be provided to audio, keyboard, mouse, joystick, and graphics hardware via Dierct3D and openGL, a specially designed cross-platform development library is required. This library is called Simple DirectMedia Layer, and is commonly known as SDL.
SDL has a great significance in developing both large and small projects. It assists in the development of high performance computer games and other media applications which run on many operating systems such as Windows, Linux, IOS, Android, etc.
Following the very simple steps (with screenshots) presented below, you can easily setup SDL in CodeBlocks and GCC MinGW Compiler. Make sure you’ve properly installed CodeBlocks on your system.
Steps to setup SDL in CodeBlocks:
Also see,
How to include graphics.h in CodeBlocks? How to setup OpenGL (GLUT) in CodeBlocks?
You can use SDL projects – Bike Race Game and Helicopter Game to check whether you correctly setup SDL in CodeBlocks. If you have any queries or suggestions regarding this post, or if you encounter any problems in the setup procedure, mention them in the comments.
By Thomas CarrieroThis tutorial assumes that you have already set up Code::Blocks and the MINGWcompiler in Windows. Now, we will add the SDL graphical libraries,which will enable you to write graphical applications. After you've donethis, you can check out our tutorial on SDL (in progress). I will assume you've installed Code::Blocks in C:Program FilesCodeBlocks. If you've installed it elsewhere, you will need to substitute the path you installed it instead of C:Program FilesCodeBlocks. Step 1: Download SDL libraries
Step 2: Uncompress the downloaded .tar.gz fileIf you do not have an application that can decompress this type of file, you can get one here: http://www.7-zip.org/download.htmlYou will want to uncompress it into its own folder, so that we can manually copy the files we need into the CodeBlocks folder. Step 3: Copy the files from the uncompressed folder to your CodeBlocks folderI suggest you start by opening both folders and putting them side by side, with the uncompressed folder on the left.The left folder should look like this: The right folder should look like this: First, double click on the 'include' folder in the left window (the uncompressed SDL folder). Move the SDL folder from the left window, into the 'include' folder in the right window (the code blocks directory). When you finish doing this, your right window's include folder should look like: (It's important that you copy the whole SDL folder, and not just the files inside of it.) Now, go back to the view you had before you moved the SDL folder. Go to the 'bin' folder on the left. Move the SDL.dll file to the 'C:Windows' folder. After you do that, the 'C:Windows' folder should look somewhat similar to this: Finally, you'll need to copy the contents of the 'lib' folder on the left folder over to the 'lib' folder on the right. When you do this step, your right folder should look like this: Test your installationYour installation should be done at this point, so you can close the folders, and open up Code::Blocks.How To Set Up Sdl In Dev C++Go to File and then New Project. Choose the SDL Application and hit Create. You will need to select a place to put it--I recommend you put it in its own folder. Open the main.cpp file and hit F9. Sdl Tutorial PdfSdl 2.0 TutorialIf you see compilation warnings, then you probably did not install the 'include' folder correctly. If it compiles okay, but crashes complaining about SDL.dll, then you did not install the 'bin' folder correctly.Otherwise, you should see the following window pop up, which means that everything is working! Sdl TutorialSdl Programming
Advertising | Privacy policy |Copyright © 2019 Cprogramming.com | Contact | About
Comments are closed.
|
AuthorWrite something about yourself. No need to be fancy, just an overview. ArchivesCategories |