extern -> You don't have the source: The compiled file is in a library. DECLSPEC -> You shouldn't care about this at the moment. SDLCALL -> Unified SDL Calling Convention
To look at the implementation, download the SDL's source code and search for SDL_RenderPresent in all the .h and .cpp files.
You'll match one .h and one .cpp file.
The .cpp file has what you're looking for.
I just cant get how it works.
When you call SDL_RenderPresent(render) it updates the screen, but how?
where is the actual code, i mean the directx or opengl stuff
A .lib file is the Windows equivalent of a Linux .a file. A .dll file is the Windows equivalent of a Linux .so file. Loosely speaking...
Windows has .lib, .a, and .dll and Linux has .a and .so (shared object) for libraries. I felt that needed to be pointed out because Allegro, for example, when compiled will name the files .lib or .a (even then I think it is dependant on the compiler because I think MSVC is .lib and MinGW is .a).
extension is irrelevalt. I can create lib file with .code extension and it will work fine.
lib and dll is extension adopted in Windows
As MinGW is windows port of linux facilities, it just didn't bother with renaming and lef everything as it was there.
So there isn't going to be a SDL_Renderer::RenderPresent
Instead... RenderPresent is likely a function pointer which points to a implementation-specific function. There is no way to tell what that function is named from just the code you posted.
Some options are:
1) Step into the function call with a debugger and see where it takes you
2) Search the source for "RenderPresent =" and see what is being assigned to that pointer.
EDIT:
actually... it's extremely likely that the function pointer would be assigned in SDL_CreateRenderer.
extension is irrelevalt. I can create lib file with .code extension and it will work fine.
I don't think that is true, at least not in Linux with GCC, so I'd imagine it would be the same for MinGW. Last I knew, the linkers were designed to look for specific extensions. I even tested this under Linux using your example. I made a quick simple library and named it both libmean.a and then named it libmans.code. Then tried linking a simple program against each. libmean.a linked with no trouble, but trying to link against libmans.code it gives a linker error that it can't find it.
But yes I didn't check all the SDL source code so there might be some C++ in there somewhere. I'm kind of doubtful though.
Yeah, Ryan Gordon (occulus) said the library is C with bindings for other languages. That it is written in C, but should work with C++ with no problem.