STL string Compilation Warning in VC++ 6.0

Q: I get the following warning in MSVC when compiling a DLL. I step through a WIN32 apllication using this DLL in the VC debugger and it seems that the DLL isn't working correctly.

warning C4251: 'testExeName' : class 'std::basic_string<char,struct std::char_traits<char>,class std::allocator<char> >' needs to have dll-interface to be used by clients of class 'COutput'

Here is my codes:
////////////////////////////////////////////////////////////////////////
#ifndef COUTPUTdotH
#define COUTPUTdotH

#ifdef UTL_EXPORTS // defined in project setting
#define UTL_API __declspec(dllexport)
#else
#define UTL_API __declspec(dllimport)
#endif

class UTL_API COutput
{
public:
COutput(const string& testName, const string& testHeader);
~COutput();
...
protected:
...
private:
COutput();
static string testExeName; // name of executible
...
};
#endif
/////////////////////////////////////////////////////////////////////////
[1146 byte] By [Tbanh] at [2007-11-18 19:17:13]
# 1 Re: STL string Compilation Warning in VC++ 6.0
Post your implementation file, please (that is, the .cpp file)

You probably need to declare
UTL_API std::COutput::testExeName;
Gabriel Fleseriu at 2007-11-9 0:32:20 >