1

I make my Qt project with Cmake and compile it in QtCreater with Visual Stuio 2010 compiler. On the old computer i had Windows 7 32 bit and it runs okay, but on the new computer i have Windows 7 64 bit and get following error message: QtGuid4.lib(QtGuid4.dll):-1: Fehler:LNK1112: module machine type 'X86' conflicts with target machine type 'x64' if I use Visual C++ Compiler 10.0(x64). And if I use Visual C++ Compiler 10.0(x86), then I get following message:

Der zum Debuggen von ausführbaren Dateien des Typs 'x86-windows-msvc2010-pe- 32bit' am besten geeignete Debugger-Engine ist nicht verfügbar. Es wird stattdessen der Debugger-Engine 'Gdb engine' benutzt. Details: Für ausführbare Dateien im Format 'x86-windows-msvc2010-pe-32bit' ist keine ausführbare CDB Datei verfügbar.

How could I make/compile with x64-compiler? Best regards. Viktor.

Viktor Tarasov
  • 87
  • 1
  • 2
  • 10
  • You need to get CMake to find the 64 bit Qt that you built instead of the 32 bit version. Use CMake-gui to set the location of the 64 bit qmake that you compiled from source and cmake will handle the rest. This assumes you want to build your application for x64 and not X86. – drescherjm Oct 15 '12 at 18:51
  • drescherjm, thank you very much. I think it is a bug of visual studio, but how could I fix it? :(( – Viktor Tarasov Oct 16 '12 at 06:42
  • 1
    This is not a bug of Visual Studio it is a configuration problem. You have your settings to build a 64 bit application but the Qt you are using is 32 bits. Since you can not use 32 bit Qt with a 64 bit application you can either build your application for 32 bits or recompile Qt so that you have a 64 bit Qt. The downloads for Qt do not provide 64 bit Qt you need to build that yourself. – drescherjm Oct 16 '12 at 11:32
  • 1
    http://qt-project.org/wiki/How_to_build_64bit_Qt_for_windows – Viktor Tarasov Oct 16 '12 at 17:41
  • Thank you very much for the information. I've found two links about this topic: http://qt-project.org/wiki/How_to_build_64bit_Qt_for_windows http://www.holoborodko.com/pavel/2011/02/01/how-to-compile-qt-4-7-with-visual-studio-2010/ – Viktor Tarasov Oct 16 '12 at 17:50
  • I've just found some other solution: http://stackoverflow.com/questions/9975949/how-to-configure-cdb-in-qt-creator – Viktor Tarasov Oct 27 '12 at 18:01

1 Answers1

2

Copied from the comments so we can mark this one answered.

You have your settings to build a 64 bit application but the Qt you are using is 32 bits. Since you can not use 32 bit Qt with a 64 bit application you have to either build your application for 32 bits or recompile Qt so that you have a 64 bit Qt. The official downloads for Qt do not provide 64 bit Qt you need to build that yourself.

drescherjm
  • 10,365
  • 5
  • 44
  • 64
  • 1
    I solved my problem!!! I had the problem with Windows SDK 7.1. To fix the problem you need to download **Windows Driver Kit 8**. http://msdn.microsoft.com/en-us/windows/hardware/hh852362.aspx Here is a very good tutorial: http://qtvon0auf100.wordpress.com/2012/06/12/qt-creator-debugger-unter-windows-7-installieren/ and here is some amendment: http://stackoverflow.com/questions/9975949/how-to-configure-cdb-in-qt-creator – Viktor Tarasov Oct 27 '12 at 19:33