qt VS2010 LNK2001、LNK 2019 错误

发布于 2024-09-25 07:39:22 字数 1661 浏览 0 评论 0原文

您好,我正在使用 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 技术交流群。

扫码二维码加入Web技术交流群

发布评论

需要 登录 才能够评论, 你可以免费 注册 一个本站的账号。

评论(2

一生独一 2024-10-02 07:39:22

这看起来可能是 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.

乖乖 2024-10-02 07:39:22

关于第一个错误。看来定义预处理器“QWT_DLL”解决了这个问题。

Regarding the first error. It seems that defining the preprocessor "QWT_DLL" resolved the issue.

~没有更多了~
我们使用 Cookies 和其他技术来定制您的体验包括您的登录状态等。通过阅读我们的 隐私政策 了解更多相关信息。 单击 接受 或继续使用网站,即表示您同意使用 Cookies 和您的相关数据。
原文