qt VS2010 LNK2001、LNK 2019 错误
您好,我正在使用 VS2010 处理 qt,并且收到这些我无法弄清楚的链接错误。这并不是说我没有尝试任何东西...我已经正确链接了我的 qwt lib 路径,并且还在附加依赖项中添加了 qwt5 。如果有人可以的话请帮助我。等待回复...
Error 67 error LNK2001: unresolved external symbol
"public: static struct QMetaObject const QwtPlot::staticMetaObject"
(?staticMetaObject@QwtPlot@@2UQMetaObject@@B)
Error 68 error LNK2019: unresolved external symbol
"void __cdecl listfiles(
class std::basic_string<
char,
struct std::char_traits<char>,
class std::allocator<char>
> &,
class std::list<
class std::basic_string<
char,
struct std::char_traits<char>,
class std::allocator<char>
>,
class std::allocator<
class std::basic_string<
char,
struct std::char_traits<char>,
class std::allocator<char>
>
>
> &
)" (?listfiles@@YAXAAV?$basic_string@DU?$char_traits@D@std@@V$allocator@D@2@
@std@@AAV?$list@V?$basic_string@DU?$char_traits@D@std@@V?$allocator@D@2@
@std@@V?$allocator@V?$basic_string@DU?$char_traits@D@std@@V?$allocator@D
@2@@std@@@2@@2@@Z)
referenced in function "private: void __thiscall
InferenceMgr::loaddirs(void)" (?loaddirs@InferenceMgr@@AAEXXZ)
Error 69 error LNK2001: unresolved external symbol
"protected: virtual void __thiscall uLeapStdin::run(void)"
(?run@uLeapStdin@@MAEXXZ)
Error 70 error LNK1120: 3 unresolved externals
Hi I am working on qt with VS2010 and I am getting these linking errors which I am not able to figure out. Its not like I didn't tried anything...I had linked my qwt lib paths correctly and also added qwt5 in additional dependencies. Please help me out if someone can. Waiting for replies...
Error 67 error LNK2001: unresolved external symbol
"public: static struct QMetaObject const QwtPlot::staticMetaObject"
(?staticMetaObject@QwtPlot@@2UQMetaObject@@B)
Error 68 error LNK2019: unresolved external symbol
"void __cdecl listfiles(
class std::basic_string<
char,
struct std::char_traits<char>,
class std::allocator<char>
> &,
class std::list<
class std::basic_string<
char,
struct std::char_traits<char>,
class std::allocator<char>
>,
class std::allocator<
class std::basic_string<
char,
struct std::char_traits<char>,
class std::allocator<char>
>
>
> &
)" (?listfiles@@YAXAAV?$basic_string@DU?$char_traits@D@std@@V$allocator@D@2@
@std@@AAV?$list@V?$basic_string@DU?$char_traits@D@std@@V?$allocator@D@2@
@std@@V?$allocator@V?$basic_string@DU?$char_traits@D@std@@V?$allocator@D
@2@@std@@@2@@2@@Z)
referenced in function "private: void __thiscall
InferenceMgr::loaddirs(void)" (?loaddirs@InferenceMgr@@AAEXXZ)
Error 69 error LNK2001: unresolved external symbol
"protected: virtual void __thiscall uLeapStdin::run(void)"
(?run@uLeapStdin@@MAEXXZ)
Error 70 error LNK1120: 3 unresolved externals
如果你对这篇内容有疑问,欢迎到本站社区发帖提问 参与讨论,获取更多帮助,或者扫码二维码加入 Web 技术交流群。
绑定邮箱获取回复消息
由于您还没有绑定你的真实邮箱,如果其他用户或者作者回复了您的评论,将不能在第一时间通知您!
发布评论
评论(2)
这看起来可能是 moc 编译器生成的文件有问题。尝试清理并构建。确保正在生成 moc 文件并且目标文件最终位于链接器可以找到的位置。
This looks like it might be a problem with the files generated by the moc compiler. Try a clean and build. Make sure the moc files are being generated and the object files end up in a location where they can be found by the linker.
关于第一个错误。看来定义预处理器“QWT_DLL”解决了这个问题。
Regarding the first error. It seems that defining the preprocessor "QWT_DLL" resolved the issue.