Jump to content
  • Advertisement
Sign in to follow this  
Revelation60

Making the engine a dynamic library

This topic is 3326 days old which is more than the 365 day threshold we allow for new replies. Please post a new topic.

If you intended to correct an error in the post then please contact us.

Recommended Posts

I want to make my engine a dynamic library, but I have got little experience with dynamic libraries. What would be the easiest way to expose classes and variables? Should I really prefix all classes with macro's like EXPORT and IMPORT or is there an easy way to just expose everything?

Share this post


Link to post
Share on other sites
Advertisement
From what I know, windows need export and import directives while unix-like systems do not.
I prefix classes with DLL_INTERFACE and on windows use
#define DLL_INTERFACE __declspec(dllexport)
when building the library, and
#define DLL_INTERFACE __declspec(dllimport)
when using the library. (empty definitions on linux)

Even if you could somehow export all when building a DLL, I believe you would still need import directives when using it, so you would still need to prefix your classes in the headers.

Share this post


Link to post
Share on other sites
Sign in to follow this  

  • Advertisement
×

Important Information

By using GameDev.net, you agree to our community Guidelines, Terms of Use, and Privacy Policy.

Participate in the game development conversation and more when you create an account on GameDev.net!

Sign me up!