Tek-Tips is the largest IT community on the Internet today!

Members share and learn making Tek-Tips Forums the best source of peer-reviewed technical information on the Internet!

  • Congratulations wOOdy-Soft on being selected by the Tek-Tips community for having the most helpful posts in the forums last week. Way to Go!

Templates

Status
Not open for further replies.

yoggi

Programmer
Jul 24, 2001
2
CA
I d like to create templates properly with Visual C++, I mean without including all the code when I use a template class instance. On the one hand Visual Studio help is not that clear about that: it advises to use a dll but I have linkage errors by doing so. On the other hand, Stroustrup advises to use keyword export in his C++ language book but this keyword doesn't happen to exist for Visual C++. What are the solution I should use?
Thanks for all your answers

Yoggi
 
You can't use templates is dll's exports. John Fill
1c.bmp


ivfmd@mail.md
 
Thanks for your answer. But do you know how to do to link templates properly. My method is now creating include files in all the files where I need a template class. But it is definitely not the good solution. Any idea? Please don t hesitate sending me some solutions.


Yoggi
 
if you're using some templates in dll and viceversa, you must use the same templates in exe and viceversa. John Fill
1c.bmp


ivfmd@mail.md
 
Status
Not open for further replies.

Part and Inventory Search

Sponsor

Back
Top