what does warning C4251 class needs to have dll interface to be used by clients of class mean?

EDN Admin

Well-known member
Joined
Aug 7, 2010
Messages
12,794
Location
In the Machine
what does C4251 class needs to have a dll interface warning mean?<br/>
<br/>
Warning 1 warning C4251: reg::RegPartBase::mPartText : class std::basic_string<_Elem,_Traits,_Alloc> needs to have dll-interface to be used by clients of class reg::RegPartBase c:srcpplibfilepreviewx64debugRegPart.h 32 1 LibFilePreview
I have a class in a DLL. In the project that uses the DLL there is a header file that declares the class with __declspec(dllimport).
<br/>
<br/>

<pre class="prettyprint class __declspec(dllimport) RegPartBase
{

public:
wstring mPartText ;
PartType mPartType ;
...
} ;
[/code]
<br/>
<span style="color:#0000ff; font-size:medium <span style="color:#0000ff; font-size:medium <span style="color:#0000ff; font-size:medium

<span style="font-size:medium <span style="font-size:medium
<span style="font-size:medium <span style="font-size:medium

View the full article
 
Back
Top