Jump to content
  • Advertisement

Archived

This topic is now archived and is closed to further replies.

Perferati

Templates and Static Libraries

This topic is 5403 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 am very frustrated with this problem... I want to have a library with a bunch of data structures, i want the user to only have to link the .lib and include the .h. I do NOT want all the implementation to be contained in the .h file, just the interface. Heres the problem, my data structues use templates, now apparently in Visual C++ i have two options, define all my templated classes fully in one file (the .h file) or make sure I do explicit functions in the .cpp file (that is, make sure I have a funciton for each type I want to use, NOT practical) I simply want the implementation hidden from the user and use templates, sounds simple enough but is it even possible? I dont want to explicitly define the types the functions will work with because I don''t even know at this point..and that seems a total waste of the necessity of templates. Bah, im frustrated..please, if anyone knows a way I can put my entire templated class in a .lib and link from that, please let me know.

Share this post


Link to post
Share on other sites
Advertisement

  • Advertisement
×

Important Information

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

GameDev.net is your game development community. Create an account for your GameDev Portfolio and participate in the largest developer community in the games industry.

Sign me up!