1
votes

I'm having serious problems with building 64 bit Qt libraries on Windows 7, you won't believe me but I've tried to build with almost all possible combinations but error is always the same: always same link errors.

I've also tried all possible combinations using property pages and adding custom properties. all work fine with x86 build libraries but not with 64 bit one.

did any of you have luck building 64 bit Qt on Windows 7 using visual studio 2010.

by the way I'm using this: Windows 7 enterprise SP1, Visual Studio 2010 ultimate SP1, Qt 4.7 sources (which only work when build using 32 bit MSVS cmd)

here are some of output errors when building Qt applications with 64 bit profile in VS 2010:

Error 1 error LNK2019: unresolved external symbol "__declspec(dllimport) public: virtual __cdecl QApplication::~QApplication(void)" (__imp_??1QApplication@@UEAA@XZ) referenced in function main C:\Users\Admin\Documents\Visual Studio 2010\Projects\VisualStudio\Qt\Qt.obj Error 2 error LNK2019: unresolved external symbol "__declspec(dllimport) public: static int __cdecl QApplication::exec(void)" (__imp_?exec@QApplication@@SAHXZ) referenced in function main C:\Users\Admin\Documents\Visual Studio 2010\Projects\VisualStudio\Qt\Qt.obj Error 3 error LNK2019: unresolved external symbol "__declspec(dllimport) public: void __cdecl QWidget::show(void)" (__imp_?show@QWidget@@QEAAXXZ) referenced in function main C:\Users\Admin\Documents\Visual Studio 2010\Projects\VisualStudio\Qt\Qt.obj Error 4 error LNK2019: unresolved external symbol "__declspec(dllimport) public: static void __cdecl QApplication::setActiveWindow(class QWidget *)" (__imp_?setActiveWindow@QApplication@@SAXPEAVQWidget@@@Z) referenced in function main C:\Users\Admin\Documents\Visual Studio 2010\Projects\VisualStudio\Qt\Qt.obj

1
thanks for reply, but the wiki page on link of your link is an old version tutorial for VS 2005 and it does not work cos I've allready folowed that tutorial :/codekiddy
Just to be sure: Have you also done the Setting up the folders part? Those linker errors tell you the linker does not find any library which contains the Qt symbolsTim Meyer
yeah I did that too, and then I've link against those and other libs in my project no luck, altrought I'm not shore how does those folders afcet installation. maybe I've done something wrong but... not shore. most important is QTDI and PATH to be seted up isn'it?codekiddy

1 Answers

0
votes

I've successfully built Qt 4.7.4 and 4.8 for x64 Windows using VS 2008. You've probably missing something of these:

  • Launch the Visual Studio 2008 x64 Win64 Command Prompt, that's the most important part. Use x64 command promt, not x86
  • SET QTDIR=D:\My\Path\Qt
  • SET PATH=%QTDIR%\bin;%PATH%
  • cd /D %QTDIR%
  • configure ... with your params
  • build