Deady Online

Delivering information to the world. You are always welcomed to join!
 
AcasaPortalCalendarFAQCautareMembriGrupuriInregistrareConectare

Distribuiti | 
 

 Sdl libraries for codeblocks, installation guide

Vezi subiectul anterior Vezi subiectul urmator In jos 
AutorMesaj
Oscuridao
Admin


Mesaje : 330
Data de inscriere : 27/08/2011
Varsta : 22
Localizare : Romania

MesajSubiect: Sdl libraries for codeblocks, installation guide   Lun Mar 21, 2016 1:29 am

This guide is about how can you install sdl libraries for codeblocks:

Steps:
1. Download SDL Libraries for Mingw, from the internet, or from here.
2. Extract them somewhere on your drive.
3. Open Codeblocks, and go to Settings -> Compiler -> Search directories -> Compiler, and add there the location of your SDL library directory and the include folder.
For example:
C:\SDL2-2.0.3\i686-w64-mingw32\include\
4. Go to Settings -> Compiler -> Search directories -> Linker, and add there the location of your SDL library directory and the lib folder.
For example:
C:\SDL2-2.0.3\i686-w64-mingw32\lib\
5. Go to Settings -> Compiler -> Linker Settings -> Other linker options -> and add the following:
-lmingw32
-lSDL2main
-lSDL2

After you compile a file be sure you open the executable file in a directory with SDL.dll which you can find also in the SDL Library directory/bin.
Also if you encounter messages with missing dll files while trying to open your executable, download them from the internet.

While programming be sure you use: int argc, char** argv, as arguments for the main function, otherwise you will encounter compilation error something such us: undefined reference to SDL_main, if your compiler is friendly enough.
int main(int argv, char** args)
{
     Write here the code.
}
To use OpenGL add these lines to Settings -> Compiler -> Linker Settings -> Other linker options:
-lglu32
-lOpenGL32

These libraries are installed by the Codeblocks, so you don't need to download anything.

You can also try:
SDL Libraries for Mingw DevCpp
SDL Libraries for Microsoft Visual Studio
Sus In jos
Vezi profilul utilizatorului http://deady.dk-one.com
 
Sdl libraries for codeblocks, installation guide
Vezi subiectul anterior Vezi subiectul urmator Sus 
Pagina 1 din 1

Permisiunile acestui forum:Nu puteti raspunde la subiectele acestui forum
Deady Online :: Others :: Altele!-
Mergi direct la: