<分区> 分区>
Possible Duplicate:
std::vector needs to have dll-interface to be used by clients of class 'X<T> warning
这是我在该组中的第一篇文章。
我正在创建一个 DLL 并在应用程序的主文件中调用它。代码编译正常,但出现以下错误:
warning C4251: 'PNCBaseClass::m_vAvailChannelsFromRx' : class 'std::vector<_Ty>' needs to have dll-interface to be used by clients of class 'PNCBaseClass'
3> with
3> [
3> _Ty=int
3> ]
我的代码如下:
#define TEST_API __declspec(dllexport)
class TEST_API PNCBaseClass
{
public:
vector<int> m_vAvailChannelsFromRx
};
我已经寻找解决方案并尝试过但失败了。
我不想禁用警告。