Jump to content
  • Advertisement

Archived

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

DLL exports and templates

This topic is 5380 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 writing a Windows DLL, and am getting the following warning: warning C4251: 'm_symbolTable' : class 'TDictionary' needs to have dll-interface to be used by clients of class 'Console' where m_symbolTable is a protected member of the Console class, defined as: Dictionary m_symbolTable; where Dictionary is defined as: typedef TDictionary Dictionary; where GObject is: class GAMELIB_API GObject { ... blah } and GAMELIB_API is: #ifdef GAMELIB_EXPORTS #define GAMELIB_API __declspec(dllexport) #else #define GAMELIB_API __declspec(dllimport) #endif The class TDictionary is a template class included from another directory (from my collections classes), and is defined as: template class COLLECTIONS_DLLEXPORT TDictionary { ... blah }; where COLLECTIONS_DLLEXPORT is the same as GAMELIB_API I have tried explicitly putting __declspec(dllexport) in place of COLLECTIONS_DLLEXPORT, but to no avail. The Console class is exported ok, as I have used the DLL in another project, but every member variable that is one of the collection classes throws up a warning. It does this when compiling the DLL, and when compiling projects using the DLL. Everything works fine, but there are just loads of warnings. What am I doing wrong? [edited by - dbx on August 16, 2003 6:19:12 AM]

Share this post


Link to post
Share on other sites
Advertisement
Well, yes, I have had to do that for now. But can I ignore this problem, I don''t want to get bitten later on?

Share this post


Link to post
Share on other sites

  • 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!