Note that there are some explanatory texts on larger screens.

plurals
  1. POQt 4.8.2 + vs2010 + static + project build issues LNK2019 & LNK2005
    primarykey
    data
    text
    <p>I had successfully compiled a static version of qt4.8.2 by following the instructions from this post <a href="http://www.holoborodko.com/pavel/2011/02/01/how-to-compile-qt-4-7-with-visual-studio-2010/" rel="nofollow">http://www.holoborodko.com/pavel/2011/02/01/how-to-compile-qt-4-7-with-visual-studio-2010/</a> </p> <p>However, I encountered a list of errors when compile my project, they are LNK2019 &amp; LNK2005 related.</p> <p>I attached the error messages at the bottom.</p> <p>For the LNK2005 related errors , I included LIBCMT at Linker->Input->Ignore Specific Default Libraries, and its related errors disappear from the error list, but is that the right way to do it?</p> <p>For the LNK2019 related errors, I couldn't resolve them, please give me some instructions.</p> <p>Here is my project settings:</p> <pre><code>C/C++ -&gt; Code Generation -&gt; Runtime Library: Multi-threaded Debug (/MTd) C/C++ -&gt; Language -&gt; Treat WChar_t As Built in Type: No ( /Zc:wchar_t- ) Linker-&gt; Input -&gt; Additional Dependencies: Imm32.lib Ws2_32.lib winmm.lib qtmaind.lib QtCored.lib QtGuid.lib wsock32.lib </code></pre> <p>LNK2019 related error messages:</p> <pre><code>- Error 161 error LNK2019: unresolved external symbol "__declspec(dllimport) public: class std::basic_string&lt;char,struct std::char_traits&lt;char&gt;,class std::allocator&lt;char&gt; &gt; __thiscall QString::toStdString(void)const " (__imp_?toStdString@QString@@QBE?AV?$basic_string@DU?$char_traits@D@std@@V?$allocator@D@2@@std@@XZ) referenced in function "private: void __thiscall MainForm::on_actionConfiguration_triggered(void)" (?on_actionConfiguration_triggered@MainForm@@AAEXXZ) C:\Working\ProjLocation\test\mainform.obj test - Error 163 error LNK2019: unresolved external symbol "__declspec(dllimport) public: class QString &amp; __thiscall QString::append(char const *)" (__imp_?append@QString@@QAEAAV1@PBD@Z) referenced in function "private: void __thiscall MainForm::summaries_series(struct series const *)" (?summaries_series@MainForm@@AAEXPBUseries@@@Z) C:\Working\ProjLocation\test\mainform.obj test - Error 162 error LNK2019: unresolved external symbol "__declspec(dllimport) public: __thiscall QString::QString(char const *)" (__imp_??0QString@@QAE@PBD@Z) referenced in function "private: void __thiscall MainForm::on_actionLogin_triggered(void)" (?on_actionLogin_triggered@MainForm@@AAEXXZ) C:\Working\ProjLocation\test\mainform.obj test </code></pre> <p>LNK2005 related error messages:</p> <pre><code>- Error 12 error LNK2005: __set_invalid_parameter_handler already defined in LIBCMTD.lib(invarg.obj) C:\Working\ProjLocation\test\LIBCMT.lib(invarg.obj) test &lt;more LIBCMT &amp; LIBCMTD related errors…..&gt; - Error 17 error LNK2005: “void __cdecl _invalid_parameter(unsigned short const *,unsigned short const *,unsigned short const *,unsigned int,unsigned int)” (?_invalid_parameter@@YAXPBG00II@Z) already defined in LIBCMTD.lib(invarg.obj) C:\Working\ProjLocation\test\LIBCMT.lib(invarg.obj) test </code></pre>
    singulars
    1. This table or related slice is empty.
    plurals
    1. This table or related slice is empty.
    1. This table or related slice is empty.
    1. This table or related slice is empty.
    1. This table or related slice is empty.
    1. This table or related slice is empty.
 

Querying!

 
Guidance

SQuiL has stopped working due to an internal error.

If you are curious you may find further information in the browser console, which is accessible through the devtools (F12).

Reload