Wiki Page Content

Differences between revisions 4 and 5
Revision 4 as of 2011-06-29 00:45:48
Size: 1480
Editor: SheenaSmith
Comment: update content for consistency - add SDL_GetError() to NULL RVs
Revision 5 as of 2013-08-07 23:45:18
Size: 829
Editor: Sam Lantinga
Comment:
Deletions are marked like this. Additions are marked like this.
Line 3: Line 3:
||<tablewidth="100%" style="color: #FF0000;" :> DRAFT||
Line 30: Line 29:
*<<BR>>These functions only work on C function names. Other languages may have name mangling and intrinsic language support that varies from compiler to compiler.

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.

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.<<BR>>*
''You can add useful comments here''
Line 37: Line 32:
 .[[SDL_LoadFunction]] *
 .[[SDL_UnloadObject]] *
 .[[SDL_LoadFunction]]
 .[[SDL_UnloadObject]]

SDL_LoadObject

Use this function to dynamically load a shared object and return a pointer to the object handle.

Syntax

void* SDL_LoadObject(const char* sofile)

Function Parameters

sofile

a system dependent name of the object file

Return Value

Returns a pointer to the object handle or NULL if there was an error; call SDL_GetError() for more information.

Code Examples

#include "SDL_loadso.h"

// Dynamically load mylib.so
SDL_LoadObject("mylib.so");

Remarks

You can add useful comments here


CategoryAPI, CategorySharedObject

None: SDL_LoadObject (last edited 2017-03-11 22:55:32 by PhilippWiesemann)

(Page Info.)
Feedback
Please include your contact information if you'd like to receive a reply.
Submit