error LNK2019: 无法解析的外部符号 "public: virtual void * __thiscall
2017-11-07 10:28
543 查看
vs2010,qt5.7
error LNK2001: 无法解析的外部符号 "public: virtual void * __thiscall MyThread::qt_metacast(char const *)" (?qt_metacast@MyThread@@UAEPAXPBD@Z)
原因:我是用beyondcompare 修改的cpp文件,用vs直接编译修改后的文件,可能vs还有缓存
解决办法:
将MyThread.h和MyThread.cpp从项目中排除,重新生成一次项目,然后包含在项目中,重新生成即可。
推测是编译缓存问题。。。
还有一种情况,同事把引用的继承取消了,vs自带的lib引用不了了
解决方法:
把继承的lib加上
特别感谢作者:
http://blog.csdn.net/qq_19462279/article/details/51004201
error LNK2001: 无法解析的外部符号 "public: virtual void * __thiscall MyThread::qt_metacast(char const *)" (?qt_metacast@MyThread@@UAEPAXPBD@Z)
原因:我是用beyondcompare 修改的cpp文件,用vs直接编译修改后的文件,可能vs还有缓存
解决办法:
将MyThread.h和MyThread.cpp从项目中排除,重新生成一次项目,然后包含在项目中,重新生成即可。
推测是编译缓存问题。。。
还有一种情况,同事把引用的继承取消了,vs自带的lib引用不了了
解决方法:
把继承的lib加上
特别感谢作者:
http://blog.csdn.net/qq_19462279/article/details/51004201
相关文章推荐
- VC++常规错误之一:error LNK2019: 无法解析的外部符号 "public: void __thiscall
- VC++常规错误之一:error LNK2019: 无法解析的外部符号 "public: void __thiscall
- VC++常规错误之一:error LNK2019: 无法解析的外部符号 "public: void __thiscall
- VC++常规错误之一:error LNK2019: 无法解析的外部符号 "public: void __thiscall
- error LNK2019: 无法解析的外部符号 __imp__wcsftime,该符号在函数 "public: virtual long __thiscall CUVideoTransHost::Transform
- 错误 4 error LNK2019: 无法解析的外部符号 "public: __thiscall CRobotProvider::~CRobotProvider(void)" (??1CRobotP
- error LNK2019: 无法解析的外部符号 "public: __thiscall Date::~Date(void)" (??1Date@@QAE@XZ),该符号在函数 _main 中被引用
- MFC DLL报错:error LNK2019: 无法解析的外部符号 "__declspec(dllimport) public: __thiscall
- obj : error LNK2019: 无法解析的外部符号 "public: __thiscall B::B(void)" (??0B@@QAE@XZ),该符
- error LNK2019: 无法解析的外部符号 "public: virtual __thiscall oracle::occi::SQLException
- 错误 1 error LNK2019: 无法解析的外部符号 "public: __thiscall chain<int>::~chain<int>(void)" (??1?$chain@H@@QAE@
- 1>MSVCRTD.lib(exe_main.obj) : error LNK2019: 无法解析的外部符号 _main,该符号在函数 "int __cdecl invoke_main(void)"
- error LNK2019:无法解析的外部符号 public: void(找前面的函数)
- mainwindow.obj:-1: error: LNK2019: 无法解析的外部符号 "public: __cdecl about::about(class QWidget *)" (??0abo
- osg 多个error LNK2019: 无法解析的外部符号 "__declspec(dllimport) public:
- error LNK2019: 无法解析的外部符号 "__declspec(dllimport) public: struct std::_Wrap_alloc<class std::allocator
- MSVCRTD.lib(exe_main.obj) : error LNK2019: 无法解析的外部符号 _main,该符号在函数 "int __cdecl invoke_main(void)"
- error LNK2019: 无法解析的外部符号 _cvHaarDetectObjects,该符号在函数 "void __cdecl detect_and_draw(struct _IplImage
- 1>main.obj : error LNK2019: 无法解析的外部符号 "public: __thiscall cv::SIFT::SIFT(int,int,double,double,doubl
- QT中异常退出或者mainwindow.obj:-1: error: LNK2019: 无法解析的外部符号 "public: __thiscall scriptDlg::scriptDlg(class