PDA

View Full Version : 64 bit application for Windows using QT library



ilgale
27th February 2012, 08:16
We need to develop a 64 bit application for Windows using QT Libraries.

Is there a way to use QTCreator 4.7.4 ?

Do we need to recompile QTCreator source code with a 64 bit compiler ?

Using VisualStudio 2010 instead of QTCreator, can be a shortcut ?

Regards

wysota
27th February 2012, 08:53
QtCreator is just a text editor. You don't need 64bit QtCreator to build 64bit applications. However you need 64bit Qt to do that and as far as I know for Windows you need to build it yourself.

Atomic_Sheep
1st June 2016, 15:04
Sorry, stupid question what is 64 bit qt?

anda_skoa
1st June 2016, 15:28
Sorry, stupid question what is 64 bit qt?

Qt built for a 64 bit system.

Cheers,
_

Atomic_Sheep
2nd June 2016, 08:23
What is Qt then if it's not Qt creator? I know Qt Creator is an IDE.

anda_skoa
2nd June 2016, 08:51
Seriously?

You have 156 posts on a Qt forum and don't know what Qt is?

And you have been using a web based forum for 5 years and haven't heard of Wikipedia?
https://en.wikipedia.org/wiki/Qt_(software)

Cheers,
_

ChrisW67
2nd June 2016, 12:48
Qt is a library that you can use in programs. The Qt library can be built on Windows using a 32-bit tool chain or a 64-bit tool chain for use in programs built with the matching tool chain. The qmake tool that comes with a Qt library will arrange building applications using that library and the same tool chain.

Qt Creator builds Qt applications by running qmake from a target Qt library on your behalf.

Atomic_Sheep
2nd June 2016, 17:42
I program on and off as a hobby.

Atomic_Sheep
4th June 2016, 08:38
Qt is a library that you can use in programs.

Thanks Chris.


Qt Creator builds Qt applications by running qmake from a target Qt library on your behalf.

Not sure if I fully understand this statement, but is this why you're able to run programs from Qt that when run from the directory where you get the compiled .exe, you sometimes get errors like certain libraries are needed for the program to run successfully?

d_stranz
4th June 2016, 14:42
Not sure if I fully understand this statement, but is this why you're able to run programs from Qt

You are still confused. Qt is not a program. You do not "run things from Qt". Qt is a set of libraries, binary code that gets linked into a program to provide your program with support for creating a GUI, interacting with the network, file system, mouse, keyboard, and so forth. Your program uses the Qt libraries, Qt does not "run" your program, nor does your program "run" Qt.

Likewise, Qt Creator (which you are presumably using to create your program) is not Qt. Qt Creator is a tool to help you create, edit, and build projects that use the Qt library. It's an IDE, an Interactive Development Environment. It is only one of many such IDEs that you can use to create Qt-based programs. Microsoft Visual Studio, Eclipse, CodeBlocks, and plain old Notepad and the command line can be used to build Qt-based programs, too. What makes an IDE useful is that it does things like 1) set up the environment path so that when you start a Qt program from within it, the program can locate the Qt runtime libraries; 2) provide C/C++ aware editors to help make code development easier; 3) provide "wizards" to create and manage project configurations for you; 4) provide GUI wrappers for command line tools like qmake, make, compilers, linkers, and debuggers so that these external programs appear to be part of the IDE (the "integrated" bit), and 5) many other useful things which are usually much harder to do manually.

The reason why your Qt-based programs will run from within an IDE but not when you run from the command line is that your IDE has set the PATH environment it uses to include the Qt runtime library location when it starts up, whereas your normal environment PATH variable (i.e. outside of the IDE) does not include these paths. If you set your environment variable properly, you could run a new Qt-based program from its directory without errors due to missing libraries, just as you can from within the IDE.

Atomic_Sheep
4th June 2016, 16:57
Sorry I did mean to say from Qt Creator.