Building 64bit Qt on 32bit Xp computer - c++

I'm trying to build Qt in a shared 64 bit mode on my 32bit XP system.
I can configure the QMake and start the 64bit build. The problem is that when the build starts, the first thing that happens in that the process builds ui, moc and rcc utility compilers in 64 bit mode, then tries to run them on my 32bit machine.
Does anyone know how to configure the build so that it does not build those compilers first?

I don't think Qt support cross-compilation on Windows.
I suggest doing it the other way around, by using a 64bit machine (and a 64 bit version of Windows) to build the 64bit and 32bit versions.

Related

CMakeLists.txt that covers 32-bit Linux, 64-bit Linux and 32-bit Windows

How do I make a C++ CMake project that works in this way?
All build intermediate products and binaries will be separated into 2 folders, one for 32-bit and the other for 64-bit. The names of the binaries will be the same for 32-bit and 64-bit.
If my current platform is 32-bit Linux or non-Linux (e.g. Windows), then build only 32-bit.
If my current platform is 64-bit Linux, then build for both 32-bit and 64-bit.
If my current platform is 32-bit Linux, then CPack will produce Debian and TGZ packages only for the 32-bit binaries.
If my current platform is 64-bit Linux, then CPack will produce Debian and TGZ packages for both the 32-bit and 64-bit binaries.
The program depends on sqlite3 and Qt4.
By the way, for Windows, I'm currently generating setup packages using InnoSetup. On Windows, it is built using mingw. My program is currently distributed for 32-bit Linux and 32-bit Windows, but I would like to add 64-bit Linux as well.
My build platform is Ubuntu 64-bit but I would like to support building on Linux 32-bit as well. The project is also built on Travis CI, which provides virtual build machines made of Ubuntu 32-bit.

How to install cmake on Windows 64 bit

The download page for cmake only shows a 32 bit installer for windows. Any idea how to install it on 64 windows systems.
There is really no reason for a 64bit native CMake. CMake is only building the configuration, so you can use it to build configurations for 64bit software, even with the 32bit version.
That being said, if you truly want a 64bit native version, you could always download the source and compile it. There is no 64bit installer, however.
The 32 bit version works perfectly even on 64 bit Windows. I've used it, and it works.
EDIT: It looks like CMake is now available in both 32-bit and 64-bit flavors. Just go to their website and you can get the 64-bit version.
A 64-bit Windows installer is now available from the download page: https://cmake.org/download

Linking 64bit app with 32bit lib in centos 5.6 64bit

I want to build an application on Centos 5.6 64bit as a 64bit application and link it with a 32bit library.
How can i do this and what is the switches i need to pass to the gcc to compile and link.
Thanks.
You cannot. A 64 bit application must link to 64 bit libraries. If the library you must use is 32 bit, you must compile your application 32 bit as well.

Build 64 bit static library

I want to build static library, that will be used with 64bit Qt Creator. I can build this lib(freetype) on Windows, or Mac, it doesn't matter. On Windows I've found mingw-64 and here is a question- is it neccessary to have 64bit version of make(for makefiles) from mingw64, or there is some way to just swap mingw32-g++ with 64bit version, and use old make from mingw32? Am I misunderstanding sth? I've already built 32bit version of freetype.a and it works fine on ubuntu and windows, where I have 32bit Qt Creator(and for Mac there is only 64bit Qt Creator, I don't know why...)
Thanks.
The make system doesn't care whether mingw is 32 or 64 bit. All it cares is that it can call off to the program. If you can run these programs from a command line, so can make.

Multiplatform C++ cross-compiler

How can I build a cross-compiler for a C++ library to target many platforms on a single build server?
The cross-compiler should be able to build the library for (at least) {Windows 7, Mac OS X, Ubuntu 11.04} × {32 bit, 64 bit} × {Debug, Release}. I don't care if the whole build from scratch takes forever or if the gcc binary is 1 GB. If the cross-compiler cannot be a single executable, what is the workflow I should use to compile (and recompile) my library?
The host machine would be a Ubuntu 11.04.
Building cross-compiler is quite well covered in OSDev Wiki. For Windows, you can use mingw packages in your distro's repository
Windows host + TeamCity + GCC (mingw) + Gnu Make (or complementary build script solution) + MSVC8/9
You can have teamcity automate the building of everything for you, GCC will let you build targets in all DBG/REL, 32/64 bit, MacOS/Linux permutations. MSVC8/9 test for cross-compiler compatibilities.