SDL_LoadObject function
SDL_LoadObject -- Loads a shared object.
Syntax
void* SDL_LoadObject(const char* sofile)
Description
This function dynamically loads a shared object.
Note 1: These functions only work on C function names. Other languages may have name mangling and intrinsic language support that varies from compiler to compiler.
Note 2: Make sure you declare your function pointers with the same calling convention as the actual library function. Your code will crash mysteriously if you do not do this.
Note 3: Avoid namespace collisions. If you load a symbol from the library, it is not defined whether or not it goes into the global symbol namespace for the application. If it does and it conflicts with symbols in your code or other shared libraries, you will not get the results you expect.
Parameter
sofile [in]
- The system dependent name of the object file to load
Return value
NULL
- On error
The pointer to the object handle
- On success
See Also
SDL_LoadFunction, SDL_UnloadObject
Example
1 #include "SDL_loadso.h"
2
3 // Dynamically load mylib.so
4 SDL_LoadObject("mylib.so");
Requirements
Header |
SDL.h |
Version |
1.2.13 |
Shared object |
libSDL.so |
DLL |
SDL.dll |
