Skip to main content
gamedev.net
🔒 Locked

Cross Platform Dll

Started by Supaflyfrank Mar 4, 2008 at 10:51 PM 1 replies 1.1k views
Original Post
Supaflyfrank
Supaflyfrank
I am planning on writing an application in which I will have a plugin interface. I am going to be using WxWidget a cross platform framework that will allow me to write platform independent code and thus allow me to display it in the OS native gui. But for my plugin systems I create are usually through MS operating systems so I was wondering how can I create a dynamic runtime dll library in Windows,Linux and Macintosh operating systems.
frob
frob
Neither MacOS nor Linux use .dll files for that. They generally use .so files. Neither OS uses Windows' PE file format for their libraries, either, so you're going to need platform-specific compiled libraries anyway.

There is no way to write what you describe in a cross platform way. You will need to have platform-specific code in each build to accomplish that kind of plugin support. Since you say Windows is your primary audience, I suggest you get your system working there first.
GamerSg
GamerSg
1) Provide a wrapper for the plugin interface, you implement the platform specific dll code, your user's write portable code using your interface. But their plugins still need to be recompiled for each platform without source changes.

2) Use scripts instead of plugins, depending on your needs, Lua or Python are popular. Scripts will be cross-platform not needing recompilation.

Topic Locked

This topic has been locked by a moderator. New replies are not allowed.

Sign in to reply to this topic.