subject_15218.htm

来自「一些关于vc的问答」· HTM 代码 · 共 21 行

HTM
21
字号
<p>
序号:15218 发表者:ahyu 发表日期:2002-09-16 16:04:53
<br>主题:请教一个警告是怎么回事!!(急)
<br>内容:warning C4251: 'm_strTo' : class 'CString' needs to have dll-interface to be used by clients of class 'CTransport'<BR>
<br><a href="javascript:history.go(-1)">返回上页</a><br><a href=http://www.copathway.com/cndevforum/>访问论坛</a></p>
<hr size=1>
<blockquote><p>
回复者:ahyu 回复日期:2002-09-16 16:08:14
<br>内容:我在dll中的一个导出类中声明了一个CString m_strTo变量,结果在应用程序<BR>中赋值的时候就出现了这个警告.请问是怎么回事
<br>
<a href="javascript:history.go(-1)">返回上页</a><br><a href=http://www.copathway.com/cndevforum/>访问论坛</a></p></blockquote>
<hr size=1>
<blockquote><p>
回复者:杀手 回复日期:2002-09-16 17:03:11
<br>内容:Compiler Warning (level 1) C4251<BR>'identifier' : class 'type' needs to have dll-interface to be used by clients of class 'type2'<BR><BR>The specified base class was not declared with the __declspec(dllexport) keyword.<BR><BR>A base class or structure must be declared with the __declspec(dllexport) keyword if a function in a derived class is to be exported.<BR>
<br>
<a href="javascript:history.go(-1)">返回上页</a><br><a href=http://www.copathway.com/cndevforum/>访问论坛</a></p></blockquote>
<hr size=1>
<blockquote><p>
回复者:ahyu 回复日期:2002-09-16 17:09:22
<br>内容:class _declspec(dllexport)CTransport : public CObject <BR>{<BR>public:<BR>&nbsp;&nbsp;&nbsp;&nbsp;void ShowHello();<BR>&nbsp;&nbsp;&nbsp;&nbsp;CTransport();<BR>&nbsp;&nbsp;&nbsp;&nbsp;virtual ~CTransport();<BR>&nbsp;&nbsp;&nbsp;&nbsp;BOOL MailSend();<BR>&nbsp;&nbsp;&nbsp;&nbsp;CString m_strMailTo//-------------warning 处!<BR><BR>};<BR>应该怎么改!?<BR>2002-9-16 17:10:03

⌨️ 快捷键说明

复制代码Ctrl + C
搜索代码Ctrl + F
全屏模式F11
增大字号Ctrl + =
减小字号Ctrl + -
显示快捷键?