Abstract
一个简单的C++插件系统介绍,主要介绍linux平台下的原理及代码
Keywords
plugin framework
c++
plugin system
plugin architecture
linux
Introduction
Now, lets say that you are making a program, maybe a game, and you decide that you want to make it moddable without your intervention. Now, of course, you think of how that might be possible, and without forcing the users to inject code directly into your executable, or modifying the source code directly. How would you do this?
Well, of course, the answer is a plugin system. I’ll briefly explain how it works: A plugin system is simply where a specified folder is searched for DLLs (or the like), and if any are found, adds the contents to the program. Of course, because the program doesn’t actually know what is in the DLLs, the normal way is for the DLL’s to de