Qt deployment with external *.lib files
<p>I need help with deploying qt application with additional libs (*.lib).
My project developed in VS2010 + Qt5 and use some 3-rd party libs in LIB directory(specified with VS project settings in additional LIBrary directories).
I have searched the right way to deployment and found following solutions:</p>

<ol>
<li>use windeployqt.exe to copy all necessary qt dlls into deploy
directory. </li>
<li>make sure that user have installed redistributable C++
    package for his platform.</li>
<li>copy all resources and dependencies
        into structure like in Debug configuration.</li>
<li>add paths to the libs
    in app:</li>
</ol>

<p>QStringList paths = QCoreApplication::libraryPaths();//\n</p>

<pre><code>    paths.append(".");
    paths.append("imageformats");
    paths.append("platforms");
    paths.append("sqldrivers");
    paths.append("LIB");   // all *.lib `s there
    QApplication::setLibraryPaths(paths);
</code></pre>

<p>After this steps my app starts successfully, but when I start using code from external libs, program got crashed! (activate functions from *lib<code>s)
I</code>m trying to copy this 3rd party libs in each place that I can imagine - root folder, LIB folder (appended in VS properties), on higher level from app folder - without lucky. Also I have use external dll - it placed next to the app executable file.But it seems that it works.
In debugger I have the next errors:
crash in ntdll.dll</p>

<pre><code>CAtlString str = currentFolder-&gt;whatsThis().toStdWString().c_str();
//  std::basic_string&lt;wchar_t,std::char_traits&lt;wchar_t&gt;,std::allocator&lt;wchar_t&gt; &gt;::_Tidy(bool _Built, unsigned __int64 _Newsize)  Line 1998 C++
//  std::allocator&lt;wchar_t&gt;::deallocate(wchar_t * _Ptr, unsigned __int64 __formal)  Line 183    C++
</code></pre>

<p>What do I need to let my app start working like in debug mode in VS2010? How can I "activate" additional libs in deployed project?</p>

<p><strong>Update:</strong> Sorry guys, but problem is not in Libs. I have surprised to find that program in VS works <strong>without</strong> libs. I`m using functions only from DLL, no extra dependencies.
All errors come from CRT (ntdll.dll) - like string operation above. It means, as I think, that I have deployed wrong version of MSVCRT100D.dll. I don't know, must it works with debug dll or I need use only MSVCRT100.dll (not debug)?
Also I had changed project version to release and catch following errors on start of program: <a href="https://i.stack.imgur.com/7KQVy.jpg" rel="nofollow noreferrer"><img src="https://i.stack.imgur.com/7KQVy.jpg" alt="enter image description here"></a></p>

<p>In debug configuration it works normally. But in release - vector iterator error in function __tmainCRTStartup()/WinMain().</p>

<p><a href="https://i.stack.imgur.com/pAzwG.jpg" rel="nofollow noreferrer"><img src="https://i.stack.imgur.com/pAzwG.jpg" alt="enter image description here"></a></p>

<p>what can I do to avoid that problems?</p>

<p><strong>Update 2:</strong> I forgot rebuild dll to release, but now problem with deallocation ~basic_string() in msvcrt100.dll still actual.
<strong>What difference between run program from VS and run by double click?</strong> (dll builds statically with msvcp100.dll and msvcrt100.dll). Program execution from VS is successful. No string dealloc problems)</p>