std::string gives compiler warning in Visual Studio 2010
<p>I am migrating my Visual Studio 2005 C++ code to Visual Studio 2010. Unfortunately I am getting error on std::string on VS2010 whereas in VS2005 I never had this error before.</p>

<p>Here is the code sample</p>

<pre><code>#include&lt;string&gt;

typedef std::string String

class __declspec(dllexport) SomeClass
{
public:
   String somevariable;  // compiler warning here.  Please see below for the compiler warning.

   void SomeFunction(String sName);  // No compiler errors or warning here
};
</code></pre>

<p>Compiler warning as:</p>

<pre><code>error C2220: warning treated as error - no 'object' file generated
warning C4251: 'SomeClass::somevariable' : class 'std::basic_string&lt;_Elem,_Traits,_Ax&gt;' needs to have dll-interface to be used by clients of class 'SomeClass'

with
[
    _Elem=char,
    _Traits=std::char_traits&lt;char&gt;,
    _Ax=std::allocator&lt;char&gt;
]
</code></pre>

<p>Please help to give me solution for this issue.</p>
