building plugins on Win32 ?

Gildas Bazin gbazin at netcourrier.com
Sun May 27 17:47:40 CEST 2001


Hi

I wanted to add the possibility to build dll plugins for the VLC on Win32,
but I realized the Win32 DLL implementation lacks a really important
feature: back-linking.
What I mean by back-linking is when the DLL tries to access symbols defined
in the main program (the one which is calling the DLL).

So, when I try to build dll plugins the compiler tells me that there are
undefined symbols like:

vout_sdl.o(.text+0x1c4):vout_sdl.c: undefined reference to
`main_GetIntVariable'
vout_sdl.o(.text+0x206):vout_sdl.c: undefined reference to `intf_ErrMsg'
vout_sdl.o(.text+0x225):vout_sdl.c: undefined reference to `p_main'
vout_sdl.o(.text+0x234):vout_sdl.c: undefined reference to `intf_AssignKey'
..

I can see only two solutions to this problem:
- put the functions required by the plugins in another DLL (in that case we
can do the linking)
- Or do the run-time linking by hand, which means we would pass to the DLL
plugin (at run-time) a structure that contains the pointers to all the
necessary functions

I don't really like either of these solutions, mainly because it would
require a lot of modifications to the VLC code (even though some
functionnalities like the debug functions could be done as plugins).

I guess we can live with only builtin plugins, but dll plugins would be so
nice...

Does anybody have ideas or comments ?
Would the VLC team be ready to modify the plugins architecture just to
satisfy the needs of the Win32 port ? (I guess I already know the answer
;-)

Regards,

--
Gildas





More information about the vlc-devel mailing list