PDA

View Full Version : Problems building Qt 5 static with MSVC 2010



prophetofreason
20th January 2013, 15:21
Greetings,
I'm having issues building Qt 5 statically. I have successfully built it in shared mode, though. I configure it with:

configure -static -opengl desktop -debug-and-release -nomake demos -nomake examples -opensource -platform win32-msvc2010

The process fails with:
.
.
.
C:\Qt\Qt-5.0.0-vs2010-stat32\qtactiveqt\src\tools\idc\idc.pro -o Makefile ) && "C:\Program Files (x86)\Microsoft Visual Studio 10.0\VC\BIN\nmake.exe" -f Makefile
"C:\Program Files (x86)\Microsoft Visual Studio 10.0\VC\BIN\nmake.exe" -f Makefile.Release
cd tools\ && ( if not exist Makefile c:\Qt\Qt-5.0.0-vs2010-stat32\qtbase\bin\qmake C:\Qt\Qt-5.0.0-vs2010-stat32\qtactiveqt\tools\tools.pro -o Makefile ) && "C:\Program Files (x86)\Microsoft Visual Studio 10.0\VC\BIN\nmake.exe" -f Makefile
cd dumpdoc\ && ( if not exist Makefile c:\Qt\Qt-5.0.0-vs2010-stat32\qtbase\bin\qmake C:\Qt\Qt-5.0.0-vs2010-stat32\qtactiveqt\tools\dumpdoc\dumpdoc.pro -o Makefile ) && "C:\Program Files (x86)\Microsoft Visual Studio 10.0\VC\BIN\nmake.exe" -f Makefile
"C:\Program Files (x86)\Microsoft Visual Studio 10.0\VC\BIN\nmake.exe" -f Makefile.Debug
link /NOLOGO /DYNAMICBASE /NXCOMPAT /DEBUG /SUBSYSTEM:CONSOLE "/MANIFESTDEPENDENCY:type='win32' name='Microsoft.Windows.Common-Controls' version='6.0.0.0' publicKeyToken='6595b64144ccf1df' language='*' processorArchitecture='*'" /OUT:debug\dumpdoc.exe @C:\Users\nobody\AppData\Local\Temp\nm3C0C.tmp
Qt5AxContainerd.lib(qaxbase.obj) : error LNK2005: "bool __cdecl QVariantToVARIANT(class QVariant const &,struct tagVARIANT &,class QByteArray const &,bool)" (?QVariantToVARIANT@@YA_NABVQVariant@@AAUtagVARIAN T@@ABVQByteArray@@_N@Z) already defined in qwindowsd.lib(comutils.obj)
Creating library debug\dumpdoc.lib and object debug\dumpdoc.exp
debug\dumpdoc.exe : fatal error LNK1169: one or more multiply defined symbols found

I've also tried the suggestions given here: http://www.geometrian.com/programming/tutorials/setup_Qt.txt

I've also tried building it in just release mode with the same results. Anything suggestions would be greatly appreciated.

Ryan

prophetofreason
28th January 2013, 17:45
Ok, so I installed from the git repository and everything worked fine. I don't know what the original problem was, but it seems to be taken care of.