Important: Please read the Qt Code of Conduct - https://forum.qt.io/topic/113070/qt-code-of-conduct

How to start off with x64?



  • Now I have to setup a QT project first, then change it to x64 platform
    then choose QT settings, and point it to my x64 build
    How can I start off with x64 straight away by default?
    Thanks
    Jack


  • Moderators

    Hi,

    In Qt Creator, choose Tools -> Options -> Build & Run -> Kits

    Select the kit you want, and click "Make Default"



  • Thanks, I'll give it a go.
    Jack



  • Hello,
    I am back.
    I wonder is it possible to build QT projects with VS2010 with x64 by default also?



  • Yes it is possible. You need to re-build Qt itself in x64 or use
    these "unofficial Qt builds":http://www.tver-soft.org/qt64 of Qt for VS



  • Thank you, that's what I am looking for!
    Jack



  • At first blush, I've got an additional problem, how do I
    skip 2 steps (change the configuration setting from win32 to
    win64 then change the QT version) and starting to have
    win64 for QT kick off when I start Visual Studio,
    In standard Visual studio tweak, you can change the
    wizard file, but I can't find the relevant wizard file
    for the QT addin 1.22.
    This qmake file seems not working at all. it still produces win32 projects. i dig
    futher into the addin source code, and I found it is looking at the pe header of
    qmake.exe to determine which version to produce. Do I download the x64 version
    of qmake.exe to make it work?
    [code]

    qmake configuration for win32-msvc2010

    Written for Microsoft Visual C++ 2010

    MAKEFILE_GENERATOR = MSBUILD
    QMAKE_PLATFORM = win64
    CONFIG += incremental flat precompile_header autogen_precompile_source debug_and_release debug_and_release_target embed_manifest_dll embed_manifest_exe
    DEFINES += UNICODE WIN64
    QMAKE_COMPILER_DEFINES += _MSC_VER=1600 _WIN64
    contains(QMAKE_TARGET.arch, x86_64) {
    DEFINES += WIN64
    QMAKE_COMPILER_DEFINES += _WIN64
    }

    QMAKE_COMPILER = msvc

    QMAKE_CC = cl
    QMAKE_LEX = flex
    QMAKE_LEXFLAGS =
    QMAKE_YACC = byacc
    QMAKE_YACCFLAGS = -d
    QMAKE_CFLAGS = -nologo -Zm200 -Zc:wchar_t
    QMAKE_CFLAGS_WARN_ON = -W3
    QMAKE_CFLAGS_WARN_OFF = -W0
    QMAKE_CFLAGS_RELEASE = -O2 -MD
    QMAKE_CFLAGS_RELEASE_WITH_DEBUGINFO += -O2 -MD -Zi
    QMAKE_CFLAGS_DEBUG = -Zi -MDd
    QMAKE_CFLAGS_YACC =
    QMAKE_CFLAGS_LTCG = -GL
    QMAKE_CFLAGS_MP = -MP
    QMAKE_CFLAGS_SSE2 = -arch:SSE2
    QMAKE_CFLAGS_SSE3 = -arch:SSE2
    QMAKE_CFLAGS_SSSE3 = -arch:SSE2
    QMAKE_CFLAGS_SSE4_1 = -arch:SSE2
    QMAKE_CFLAGS_SSE4_2 = -arch:SSE2
    QMAKE_CFLAGS_AVX = -arch:AVX
    QMAKE_CFLAGS_AVX2 = -arch:AVX

    QMAKE_CXX = $$QMAKE_CC
    QMAKE_CXXFLAGS = $$QMAKE_CFLAGS
    QMAKE_CXXFLAGS_WARN_ON = $$QMAKE_CFLAGS_WARN_ON -w34100 -w34189
    QMAKE_CXXFLAGS_WARN_OFF = $$QMAKE_CFLAGS_WARN_OFF
    QMAKE_CXXFLAGS_RELEASE = $$QMAKE_CFLAGS_RELEASE
    QMAKE_CXXFLAGS_RELEASE_WITH_DEBUGINFO += $$QMAKE_CFLAGS_RELEASE_WITH_DEBUGINFO
    QMAKE_CXXFLAGS_DEBUG = $$QMAKE_CFLAGS_DEBUG
    QMAKE_CXXFLAGS_YACC = $$QMAKE_CFLAGS_YACC
    QMAKE_CXXFLAGS_LTCG = $$QMAKE_CFLAGS_LTCG
    QMAKE_CXXFLAGS_MP = $$QMAKE_CFLAGS_MP
    QMAKE_CXXFLAGS_STL_ON = -EHsc
    QMAKE_CXXFLAGS_STL_OFF =
    QMAKE_CXXFLAGS_RTTI_ON = -GR
    QMAKE_CXXFLAGS_RTTI_OFF =
    QMAKE_CXXFLAGS_EXCEPTIONS_ON = -EHsc
    QMAKE_CXXFLAGS_EXCEPTIONS_OFF =

    QMAKE_INCDIR =

    QMAKE_RUN_CC = $(CC) -c $(CFLAGS) $(INCPATH) -Fo$obj $src
    QMAKE_RUN_CC_IMP = $(CC) -c $(CFLAGS) $(INCPATH) -Fo$@ $<
    QMAKE_RUN_CC_IMP_BATCH = $(CC) -c $(CFLAGS) $(INCPATH) -Fo$@ @<<
    QMAKE_RUN_CXX = $(CXX) -c $(CXXFLAGS) $(INCPATH) -Fo$obj $src
    QMAKE_RUN_CXX_IMP = $(CXX) -c $(CXXFLAGS) $(INCPATH) -Fo$@ $<
    QMAKE_RUN_CXX_IMP_BATCH = $(CXX) -c $(CXXFLAGS) $(INCPATH) -Fo$@ @<<

    QMAKE_LINK = link
    QMAKE_LFLAGS = /NOLOGO /DYNAMICBASE /NXCOMPAT
    QMAKE_LFLAGS_RELEASE = /INCREMENTAL:NO
    QMAKE_LFLAGS_RELEASE_WITH_DEBUGINFO = /DEBUG /OPT:REF
    QMAKE_LFLAGS_DEBUG = /DEBUG
    QMAKE_LFLAGS_CONSOLE = /SUBSYSTEM:CONSOLE
    QMAKE_LFLAGS_WINDOWS = /SUBSYSTEM:WINDOWS
    QMAKE_LFLAGS_EXE = "/MANIFESTDEPENDENCY:type='win64' name='Microsoft.Windows.Common-Controls' version='6.0.0.0' publicKeyToken='6595b64144ccf1df' language='' processorArchitecture=''"
    QMAKE_LFLAGS_DLL = /DLL
    QMAKE_LFLAGS_LTCG = /LTCG
    QMAKE_EXTENSION_STATICLIB = lib

    QMAKE_LIBS_CORE = kernel32.lib user32.lib shell32.lib uuid.lib ole32.lib advapi32.lib ws2_32.lib
    QMAKE_LIBS_GUI = gdi32.lib comdlg32.lib oleaut32.lib imm32.lib winmm.lib ws2_32.lib ole32.lib user32.lib advapi32.lib
    QMAKE_LIBS_NETWORK = ws2_32.lib
    QMAKE_LIBS_OPENGL = glu32.lib opengl32.lib gdi32.lib user32.lib
    QMAKE_LIBS_OPENGL_ES2 = libEGL.lib libGLESv2.lib gdi32.lib user32.lib
    QMAKE_LIBS_OPENGL_ES2_DEBUG = libEGLd.lib libGLESv2d.lib gdi32.lib user32.lib
    QMAKE_LIBS_COMPAT = advapi32.lib shell32.lib comdlg32.lib user32.lib gdi32.lib ws2_32.lib

    QMAKE_LIBS_QT_ENTRY = -lqtmain

    QMAKE_IDL = midl
    QMAKE_LIB = lib /NOLOGO
    QMAKE_RC = rc

    include(../common/shell-win32.conf)

    VCPROJ_EXTENSION = .vcxproj
    VCSOLUTION_EXTENSION = .sln
    VCPROJ_KEYWORD = Qt4VSv1.0
    load(qt_config)
    [/code]

    Let me know
    Thanks
    Jack



  • I don't know how Qt plugin for VS2010 will work with an unofficial build.
    I think Qt plugin supports x32 versions of Qt only. But I may be mistaken.

    I would recommend to uninstall all currently installed Qt and then install only one, whatever you choose.
    If you have VS2010 x64 then install Qt x64 for VS2010 and run QtCreator from the installed Qt.
    It should set a correct compiler automatically.

    If you prefer to use VS2010 IDE with Qt plugin then it is better to use official Qt builds, which are x32.


Log in to reply