Jump to content
  • Advertisement
Sign in to follow this  
intrest86

Shared Libraries and Templates in C++?

This topic is 4736 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

Basically, I am working on a framework for pluggable code. In my intial plans for the framework some of the interfaces for the pluggable components used templates to help keep them generic. But then I thought "Hey, it would be nice if the entire project didnt have to be recompiled for every change. Maybe I should use a shared library!" But since templates are basically compile time trickery, can they not be in shared libraries?

Share this post


Link to post
Share on other sites
Advertisement
They can't be shared in libraries. CLR apps can do this (I think, as template instances are generated at JIT time, not compile time), but unless that's what you're using, you're out of luck.

Share this post


Link to post
Share on other sites
I directly share my source files for my framework between projects. This works extreemly well.

Once you get it going nicely, you might want to try using Subversion for added sophistication.

There is no real benifit to making it into a library (static or DLL). To better prevent full-recompilation, ensure your framework and project is highly modular and has few dependencies.

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!