Hi, Marcel Wiesweg wrote:
Am Freitag, 11. Juli 2003 17:25 schrieb Gunnar Roth:ah... (but you can understand the other way, if "linking" means linking at run time ;-) )is there a way to get an error about unresolved symbols when linking a plugin?Yes, there is. When the plugin is loaded, all functions in the dynamic table of the plugin need to be resolved. If a function cannot be resolved, VDR will terminate.But the question was, if there is a possibility to determine the unresolved symbol at linking time, NOT at run time.
To the question: gcc does not (and must not) know into which executable the library will be loaded. However, there are two things you can do:
- link VDR's object files with the object files of the plugin (or the plugin library) and create a dummy executable. The linker will give the errors wanted.
Something like gcc -o dummy vdr PLUGINS/lib/libvdr-xine.so did a good job.
The problem is here, that I get too much symbols for other libraries e. g. the X Window stuff.- read the plugin's dynamic relocation table with objdump -CT libvdr-myplugin.so | grep "UND" | less and find symbols which should be defined in the plugin.