How to build Qt from sources and get binaries like in maintenance tool
I want to build Qt from sources on linux unbuntu 16.04 and get binaries that behave same as the one's that come from maintenance tool(Qt 5.8 Desktop gcc 64-bit) and is located in home/user/Qt/5.8/gcc_64 . When I build binaries myself and set kit, compiler, debugger I get errors that It can't find files in system folders.
If I understand correctly I should run cofigure with settings like these:
But I don't know which one to choose.
You don't need these if you don't do cross-compilation
@jsulm Alright then what would be the difference between
and which one should I use?
@Eligijus call configure with -h parameter then you will see:
"-prefix <dir> ...... The deployment directory, as seen on the target device.
[/usr/local/Qt-$QT_VERSION, $PWD if -developer-build]
-extprefix <dir> ... The installation directory, as seen on the host machine.
Figured it out. Maybe someone will find what I did useful:
- Downloaded sources from Qt maintenance tool.
- Created directory i.e. /home/user/t_build .
- Ran configure script from downloaded sources folder (/home/user/Qt/5.8/Src) with prefix option where I want binaries installed /home/user/Qt/Src/configure -prefix /home/user/Qt/5.8/gcc_64. Running configure script from another folder is called shadow build and doesn't mix binaries with sources.
- Ran make in shadow build folder and then make install which installed binaries to /home/user/Qt/5.8/gcc_64 and I could compile project with my modifications to Qt code.
But I still have no clue what -extprefix <dir> is used for.