开发者

qt VS2010 LNK2001, LNK 2019 Errors

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 


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.


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

0

上一篇:

下一篇:

精彩评论

暂无评论...
验证码 换一张
取 消

最新问答

问答排行榜