Recent

Author Topic: How can I compile the whole the latest Qt 4.8.x widget set for Windows?  (Read 10508 times)

vfclists

  • Hero Member
  • *****
  • Posts: 1013
    • HowTos Considered Harmful?
How can I compile the whole the latest Qt 4.8.x widget set for Windows?

I have a mishmash of Qt 4.8.x DLLs cobbled together from different locations and different dates, together with the mingxxx.dll dependencies and they seem to work.

What I want now is to obtain them and all their dependencies from a certified location and get them to work, or compile them myself. Is there some standard approved location for them? If I want to compile them myself how do I get started?
Lazarus 3.0/FPC 3.2.2

mig-31

  • Sr. Member
  • ****
  • Posts: 305
Hi,

If you are talking about Lazarus with Qt widgets, Lazarus installation copy qt.dll to C:\Windows\system or system32 directory. Set your project to compile/build with Qt widgetset.
This dll you should distribute with your FreePascal/lazarus application.
Lazarus 2.2.6 - OpenSuse Leap 15.4, Mageia 8, CentOS 7

Leledumbo

  • Hero Member
  • *****
  • Posts: 8744
  • Programming + Glam Metal + Tae Kwon Do = Me
What I want now is to obtain them and all their dependencies from a certified location and get them to work, or compile them myself. Is there some standard approved location for them? If I want to compile them myself how do I get started?
https://download.qt.io/official_releases/qt/4.8/, pick one according to C/C++ compiler toolchain you'd like to have as dependencies (their runtime libraries, to be exact). Otherwise, building from source is clearly documented inside the archive.

zeljko

  • Hero Member
  • *****
  • Posts: 1591
    • http://wiki.lazarus.freepascal.org/User:Zeljan
Thing I'm doing for devel (cross from linux, but sometimes running lazarus qt under win): Normal mingw installation of qt into some folder, copy all needed dll-s into eg C:\Qt4.XX and add it to the path, and then deinstall Qt installation.
For deployment: all needed dll's go inside application dir, so I don't touch C:\Windows\System at any time.Updating Qt version is easy, just push update into appdir, instead of updating each client machine.
Besides that from Qt >= 4.8.6 you must rebuild qt4pas.dll because it wont' work with precompiled dll from official bindings page since they changed mingw version for >= 4.8.6 build and some symbols cannot be found in qt4pas.dll

vfclists

  • Hero Member
  • *****
  • Posts: 1013
    • HowTos Considered Harmful?
This is what I have just done. Installed Qt Creator, Qt SDK and the MingW32 compiler and simply copied the DLLs from from c:\Qt\487\bin directory and placed them in a directory with qt4pas5.dll. I am currently using two qt5pas5.dlls,  one from Derit and the other from the CodeLibrarian package, that were attached to this thread http://forum.lazarus.freepascal.org/index.php?topic=24606.25.

Besides that from Qt >= 4.8.6 you must rebuild qt4pas.dll because it wont' work with precompiled dll from official bindings page since they changed mingw version for >= 4.8.6 build and some symbols cannot be found in qt4pas.dll

This is the part I want to understand about rebuilding for Qt >= 4.8.6. Does this require a patched qt4.pas and some other units or libraries for linking? Is everything built with Lazarus or do you have to generate some object file and have it linked with the Mingw32 compiler?

Are the Qt DLLs required to build qt4pas5.dll or are they simply packaged with it for deployment? I don't see anything in qt4.pas that indicates that the Qt DLLs are required, unless they are for debugging purposes.


Thing I'm doing for devel (cross from linux, but sometimes running lazarus qt under win): Normal mingw installation of qt into some folder, copy all needed dll-s into eg C:\Qt4.XX and add it to the path, and then deinstall Qt installation.
For deployment: all needed dll's go inside application dir, so I don't touch C:\Windows\System at any time.Updating Qt version is easy, just push update into appdir, instead of updating each client machine.
Besides that from Qt >= 4.8.6 you must rebuild qt4pas.dll because it wont' work with precompiled dll from official bindings page since they changed mingw version for >= 4.8.6 build and some symbols cannot be found in qt4pas.dll
Lazarus 3.0/FPC 3.2.2

Leledumbo

  • Hero Member
  • *****
  • Posts: 8744
  • Programming + Glam Metal + Tae Kwon Do = Me
Are the Qt DLLs required to build qt4pas5.dll or are they simply packaged with it for deployment? I don't see anything in qt4.pas that indicates that the Qt DLLs are required, unless they are for debugging purposes.
Since you're on Windows, no. Shared libraries are not required to be present (but you'll still get warnings from linker) when compiling / linking, only when executing.

zeljko

  • Hero Member
  • *****
  • Posts: 1591
    • http://wiki.lazarus.freepascal.org/User:Zeljan
You don't need any changes in qt4.pas, just build qt4pas.dll against .h files of qt >=4.8.6 , with mingw used to build qt >= 4.8.6.

vfclists

  • Hero Member
  • *****
  • Posts: 1013
    • HowTos Considered Harmful?
This is my first time of using QtCreator and I have no idea of how to go about it.

Do you have any ready made QtCreator projects which can do the compilation?

You don't need any changes in qt4.pas, just build qt4pas.dll against .h files of qt >=4.8.6 , with mingw used to build qt >= 4.8.6.
Lazarus 3.0/FPC 3.2.2

Leledumbo

  • Hero Member
  • *****
  • Posts: 8744
  • Programming + Glam Metal + Tae Kwon Do = Me
This is my first time of using QtCreator and I have no idea of how to go about it.

Do you have any ready made QtCreator projects which can do the compilation?
QtCreator is not needed to build Qt nor qt4fpc. Simply configure + make for the former and qmake + make for the latter. Read README / INSTALL file in each archive.

 

TinyPortal © 2005-2018