|
From: | Reuben Thomas |
Subject: | Linking automatically with dlopen |
Date: | Mon, 16 Apr 2007 01:01:24 +0100 (BST) |
(I'm not quite clear, but perhaps doing this fully automatically is beyond the scope of libtool and needs linker support?)
The use I have in mind is linking CODECs with different licenses into an application without needing to change the code so that the CODECs are dlopened. Then, if certain CODECs are not available, the application can simply give an error message if the user attempts to use them, but the application author doesn't need to write (or in this case, re-write) the code to use dlopen.
If this isn't possible, is there a tool I can use to dlopen-ify my code for a particular library or list of symbols or include file or similar?
I guess if none of this is possible then the easiest way may be to rewrite the application's CODEC interface so that CODEC wrappers are themselves shared objects which can be dlopened, which avoids rewriting the CODEC wrappers. Then a failure to link a given CODEC wrapper when it is dlopened indicates won't stop the application running.
-- http://rrt.sc3d.org/ Any technology distinguishable from magic is insufficiently advanced (Keeling)
[Prev in Thread] | Current Thread | [Next in Thread] |