Usually they don't.

If your program actually depends on SQLite the dynamic linker will bring
the greatest non-api-incompatible version in automatically. You simply
add -lsqlite to the link list and libsqlite.so will automatically be
brought in- thus saving disk space at the expense of startup time.

If you need to abstractly (or logically) link- you don't know the
library name until run-time, you'll use the dlopen/dlsym interface
(which aren't quite like Win32 LoadLibrary/GetProcAddress functions--
dlopen for example, can search the _current_program_ for a symbol), or a
non-portable version (shl_load, dxe_load, etc).

Don't do this for portable code, however. Create a stub shared library
that does this so porting simply means bypassing the stub instead of
hacking around your main code...


On Sun, 2003-11-09 at 20:44, Greg Obleshchuk wrote:
> Hi ,
> This may seem like a question un-related to SQLite but there is a link.
> 
> On Windows platform to dynamically load a DLL into your program you use LoadLibrary 
> and GetProcAddress to get the reference to an exported function in the DLL.
> 
> My question is how do non Windows platforms do this?  
> 
> regards
> Greg O


---------------------------------------------------------------------
To unsubscribe, e-mail: [EMAIL PROTECTED]
For additional commands, e-mail: [EMAIL PROTECTED]

Reply via email to