Yes many times. <br><br><div class="gmail_quote">On Mon, Dec 10, 2012 at 8:54 AM, John Drescher <span dir="ltr"><<a href="mailto:drescherjm@gmail.com" target="_blank">drescherjm@gmail.com</a>></span> wrote:<br><blockquote class="gmail_quote" style="margin:0px 0px 0px 0.8ex;padding-left:1ex;border-left-color:rgb(204,204,204);border-left-width:1px;border-left-style:solid">
<div class="HOEnZb"><div class="h5">On Mon, Dec 10, 2012 at 12:59 AM, Mehdi Esteghamatian<br>
<<a href="mailto:mehdiesteghamat@gmail.com">mehdiesteghamat@gmail.com</a>> wrote:<br>
> Yes your right it should be fine although I am not getting it right yet. My<br>
> previous qt was compiled dynamically. So, I still had to put QT dlls in the<br>
> target folder.<br>
><br>
> Now I compiled the qt statically which is a bit confusing because It did not<br>
> create separate folders for statics and dynamic libraries, so now things<br>
> look like below in lib folder (D:\...\QT\4.8.4\lib). For every library I<br>
> have 4 versions. for example for QTCore I have the followings<br>
><br>
> QtCore.lib -> static release<br>
> QtCored.lib -> static debug<br>
> QtCore.lib -> dynamic rlease<br>
> QtCore.lib -> dynamic debug<br>
><br>
> NOW the problem is that I am getting redefinition link errors as below which<br>
> is probably because Visual Studio (2010) still tries to compile the target<br>
> dynamically which should no longer be the case.<br>
><br>
> I guess I need to somehow tell the VS to stick to static libraries only<br>
> either directly or through CMakeLists.txt (which I am not good at).<br>
><br>
> Please let me know if there is any suggestions.<br>
><br>
> Regards,<br>
><br>
> Mehdi<br>
><br>
><br>
> 1>------ Build started: Project: SimpleView, Configuration: Debug Win32<br>
> ------<br>
> 1>QtGuid4.lib(QtGuid4.dll) : error LNK2005: "public: __thiscall<br>
> QSizePolicy::QSizePolicy(enum QSizePolicy::Policy,enum QSizePolicy::Policy)"<br>
> (??0QSizePolicy@@QAE@W4Policy@0@0@Z) already defined in SimpleView.obj<br>
> 1>QtCored4.lib(QtCored4.dll) : error LNK2005: "public: __thiscall<br>
> QString::~QString(void)" (??1QString@@QAE@XZ) already defined in<br>
> SimpleView.obj<br>
> 1>QtCored4.lib(QtCored4.dll) : error LNK2005: "public: int __thiscall<br>
> QSize::width(void)const " (?width@QSize@@QBEHXZ) already defined in<br>
> SimpleView.obj<br>
> 1>QtCored4.lib(QtCored4.dll) : error LNK2005: "public: int __thiscall<br>
> QSize::height(void)const " (?height@QSize@@QBEHXZ) already defined in<br>
> SimpleView.obj<br>
> 1>QtCored4.lib(QtCored4.dll) : error LNK2005: "public: bool __thiscall<br>
> QBasicAtomicInt::deref(void)" (?deref@QBasicAtomicInt@@QAE_NXZ) already<br>
> defined in SimpleView.obj<br>
> 1>SimpleView.obj : error LNK2001: unresolved external symbol "private:<br>
> static class QCoreApplication * QCoreApplication::self"<br>
> (?self@QCoreApplication@@0PAV1@A)<br>
> 1>moc_SimpleView.obj : error LNK2001: unresolved external symbol "public:<br>
> static struct QMetaObject const QMainWindow::staticMetaObject"<br>
> (?staticMetaObject@QMainWindow@@2UQMetaObject@@B)<br>
> 1>D:\Research\SampleCodes\SimpleView\winbin\Debug\SimpleView.exe : fatal<br>
> error LNK1120: 2 unresolved externals<br>
> ========== Build: 0 succeeded, 1 failed, 1 up-to-date, 0 skipped ==========<br>
<br>
</div></div>Did you clean you build and also regenerate the visual studio solution<br>
using CMake-gui?<br>
<span class="HOEnZb"><font color="#888888"><br>
John<br>
</font></span></blockquote></div><br>