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

PsyCHo puNk

DLL exporting template classes

Recommended Posts

SteveC    122
I''m guessing you are using VC++ 6.0
( Because Borland C++ Builder 5.0 does it without a hitch )

VC++ is very picky about exported classes and templates, including member variables of classes that are exported.

Basically, VC++ allows you to export template instantiations. ( As does C++Builder )

But the must be EXPLICIT instantiations e.g.

template class __declspec(dllexport) std::vector;

To export a vector of longs.

Look it up on MSDN or online help - there''s info on exactly how to do it.

Share this post

Link to post
Share on other sites