Compile x64 application



  • Hi how can i compile my application so i can use it on x64 machine?

    This what i do to compile my source but it's a 32bit version and it run fine on my 32bit windows (is this the correct way to compile?)

    1. install mingw
    2. install Qt libraries 4.8.3
    3. edit C:\Qt\4.8.3\mkspecs\win32-g++\qmake.conf
    4. run Qt 4.8.3 command prompt configure -platform win32-g++ -static -release -no-exceptions
    5. run mingw32-make sub-src
    6. cd to source code path
    7. run qmake -config release
    8. run mingw32-make

    any step to add to the step above to make the Qt 4.8.3 compile output file is for x64bit?

    help please i read many tutorial but nothing suite my Qt version


  • Moderators

    You can use 32 bit binaries on 64b machines.



  • so if i need to make it only works on x64 bit machines what can i do?


  • Moderators

    I think it might be a bit complicated on Windows if you insist on using GCC (MinGW). You would need to download and use a 64 bit MinGW build, then compile Qt with it, and then compile your code. I'm not very familiar with Windows though, being a Linux geek that I am, so I might be wrong.



  • if this the instruction from the source code author what need i do? can you tell me the exact step? hahaha

    1. Download the Qt libraries from http://qt-project.org/
    2. Build the Qt libraries:

    [Windows using Microsoft Windows SDK]
    setenv /release /[x86/x64]
    configure -release [-static]
    nmake sub-src

    [Linux]
    ./configure -release [-static]
    make

    3.qmake -config release && make


  • Moderators

    AFAIK, 64 bit mingw is broken in many places and it's hard to get Qt to compile with it.

    You can use this line to explicitly set the architecture, although it probaby is Mac-only:
    configure -arch x86_64 -release
    nmake

    Or use setenv as suggested by the author you mention. What is unclear here? Just use MSVC as he/ she recommends and you should be good to go.



  • setenv /release /[x86/x64] <---this is for Microsoft Windows SDK command right?

    and then configure -release [-static] <---this is for Qt command prompt what i don't know is, how can join them both together to compile the Qt libraries

    ok i will try configure -arch x86_64 -release hope it works hahaha


  • Moderators

    Please, try to understand what you write. Yes, the setenv part is to be used when you compile with MSVC (which is part of MS SDK, at least up to and including Windows 7). I don't know setenv command, but you probably don't need to join them in any way. Just open your terminal, type the first command + enter, then second command + enter etc.



  • ok 1 question is MSVC = Microsoft Windows SDK v7.1 ..? if not what is MSVC or where can i download them? what is the best version if i want to compile Qt libraries 4.8.3 thanks i think it's more clear right now :) (hope so)


  • Moderators

    MSVC - Microsoft Visual C++. it's how most people name MS C++ compiler. Microsoft SDK is a whole package of tools, frameworks etc. useful in development, and it does indeed include MSVC. You can use almost any version to build Qt. I can recommend MSVC 9 or 10 (also called 2008 and 2010 in some places). There is a newer version available (2012), but I've heard it can cause some problems.

    Alternatively, you can get MSVC by installing Microsoft Visual Studio application.



  • cool i got Microsoft Visual Studio 2010 in my pc is it include MSVC if so how can i launch it from there? sorry im really newbie in this.


  • Moderators

    Yeah, I kind of noticed that. Not a problem, we all were newbies at some point.

    IIRC, compiler itself is hiding behind "cl" command. To be certain that you are using the 2010 version, go to menu start, find the entry for your Visual Studio installation, go to Visual Studio tools->Visual Studio Command Prompt (2010).



  • it does not works anything i miss?

    it does not recognize the command

    !http://i.imgur.com/NZdRK.png()!



  • oh but it works on Windows SDK 7.1 Command Prompt

    this is what i did

    1. launch Windows SDK 7.1 Command Prompt
    2. run cd c:/qt/4.8.3
    3. run setenv /release /x64
      4.run configure -release -static

    i think it will start compiling if i continue the procedure but will it works after that? (cant test it right now because got some task running on my windows)

    hahaha it's really troublesome just for compiling 1 little cute program


  • Moderators

    Well, Qt is huge. Normally, users should not be exposed to compiling, especially on Windows/ Mac. If someone wants to release a piece of software, he/ she should provide easy installers, or at least bundle the libraries with the application. You can download ready-made libraries from this site, by the way (not 64 bit, though ;)).



  • the author just lazy to keep updating the software so he release the source code so we can updating ourself :p

    oh can you help me about this

    this is what i do and it does compile the Qt libraries (right now its compiling the Qt libraries don't know if it will work when compiling the downloaded source code)

    1. launch Windows SDK 7.1 Command Prompt
    2. run cd c:/qt/4.8.3
    3. run setenv /release /x86
      4.run configure -release -static
      5.run nmake sub-src

    but when i do this it throw me some error

    1. launch Windows SDK 7.1 Command Prompt
    2. run cd c:/qt/4.8.3
    3. run setenv /release /x64
    4. run configure -release -static

    Creating qmake…
    execute: File or path is not found (nmake)
    execute: File or path is not found (namke)
    Cleaning qmake failed, return code -1

    please help newbie like me because i really need this thing done hahaha



  • ahhh after compiled the Qt libraries using the above method this command qmake -config release && make does not work anymore, i think i need to read more maybe i miss something here thanks for the help anyway :)



  • [quote author="furetel" date="1349972835"]ahhh after compiled the Qt libraries using the above method this command qmake -config release && make does not work anymore, i think i need to read more maybe i miss something here thanks for the help anyway :)[/quote]

    Instead of trying to compile hascat-gui, why don't you just learn how to use hashcat command line, huh?



  • :p


Log in to reply
 

Looks like your connection to Qt Forum was lost, please wait while we try to reconnect.