• Advertisement
Sign in to follow this  

std::stringstream and DLL linking problem

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

Hi! I have discovered a very odd problem while working on a dll plugin system. The dll and the main project is compiling and linking just fine, until I insert a stringstream call into the dll's sourcecode (which is used by a Logger class).
Quote:
error LNK2001: unresolved external symbol "public: class std::basic_stringstream<char,struct std::char_traits<char>,class std::allocator<char> > & __thiscall dA::Logger::Get(enum dA::eLogLevel)" (?Get@Logger@dA@@QAEAAV?$basic_stringstream@DU?$char_traits@D@std@@V?$allocator@D@2@@std@@W4eLogLevel@2@@Z)
This is the error I get. By searching the web I found someone who said dll's are having trouble with templates and since stringstream is a templateclass this might be the answer. But I can't figure out a way to avoid this error. (Except not using stringstream) Does anyone have a clue what I could do to get rid of this problem?

Share this post


Link to post
Share on other sites
Advertisement
Sign in to follow this  

  • Advertisement