Plugins in C
eli.thegreenplace.net
Plugins in C
1–10 of 12 posts
Re: Plugins in C
#2bye
Re: Plugins in C
#3You load the dlo, call a function passing in your own struct of application functions and get back a struct of plugin functions. No weird naming conventions needed, easily version-able. Tried and true.
Re: Plugins in C
#41. http://www.openwall.com/lists/musl/2012/08/20/1 2. http://www.openwall.com/lists/musl/2012/08/23/20
Re: Plugins in C
#5http://eli.thegreenplace.net/2012/08/07/fundamental-concepts...
Re: Plugins in C
#6Why not export a struct with function pointers like everyone else? You should take a look at how VST plugins are implemented. You load the dlo, call a function passing in your own struct of application functions and get back a struct of plugin functions. No weird naming conventions needed, easily version-able. Tried and true.
Re: Plugins in C
#7Why not export a struct with function pointers like everyone else? You should take a look at how VST plugins are implemented. You load the dlo, call a function passing in your own struct of application functions and get back a struct of plugin functions. No weird naming conventions needed, easily version-able. Tried and true.
Re: Plugins in C
#8Re: Plugins in C
#9Why not export a struct with function pointers like everyone else? You should take a look at how VST plugins are implemented. You load the dlo, call a function passing in your own struct of application functions and get back a struct of plugin functions. No weird naming conventions needed, easily version-able. Tried and true.
I don't know whether this was the author's intent, but it's better to start simpler (not in designs but in concepts - arguably, structs are simpler than funky naming conventions) for the beginner and less experienced dev. The struct method is a powerful one, yet not one grokked simply by the neophyte. There probably needs to be a Part II.
Ultimately, the real problem is that teaching bad designs to people because they're new to the language is counterproductive.
Re: Plugins in C
#10On a related note: Be wary of the dlclose() function, it may not necessarily free any resources[1] and not every libc implements it correctly[2]. 1. http://www.openwall.com/lists/musl/2012/08/20/1 2. http://www.openwall.com/lists/musl/2012/08/23/20