- Install Netbeans (C/C++ version) from scratch. I installed stable version 7.4
- Install MinGW x86_64 version. The path where it was installed will be henceforth called %MINGWPATH%"
- Uncompress SDL tar file to %SDLPATH%
- Add "%MINGWPATH%/msys/1.0/bin" and "%MINGWPATH%/bin" to the PATH environment variable.
- Start netbeans; it should automatically detect your mingw tool collection. If it doesn't, go to tools -> Options -> c/c++ -> build tools tab and click on add collection. Select the /bin folder of the %MINGWPATH% as the base directory, and %MINGWPATH%/msys/1.0/bin for the make.exe if it's not automatically selected.
- Now create a new project and create a c++ application.
- In Project properties -> c++ compiler -> include directories and headers -> add folder %SDLPATH%/x86_64-w64-mingw32/bin
- Do not close the window; on the Linker section add %SDLPATH%/x86_64-w64-mingw32/lib to "additional library directories".
- Finally, add these libraries in this order: mingw32.a, SDL2main.a, SDL2.a. The first file can be found on the %MINGWPATH%/x86_64-w64-mingw32/lib and the other two in the %SDLPATH%/x86_64-w64-mingw32/lib.
Now you should be able to succesfully compile an application that can make use of the SDL API. To create SDL applications, google a bit more. :)