[Interest] Is there a command line call to qmake to test the bit width?

Karl Ruetz karl.ruetz at ruetzdogz.com
Wed Mar 4 18:55:13 CET 2015


> On Mar 4, 2015, at 11:44 AM, Thiago Macieira <thiago.macieira at intel.com> wrote:
> 
> On Wednesday 04 March 2015 17:15:45 Scott Aron Bloom wrote:
>> By then its too late.. I want the shell script that calls the make system to
>> fail, saying you have the qmake setup wrong...
> 
> Why would it be wrong? If qmake is installed, it's been installed correctly 
> right? :-)
> 
> And what is the issue you're trying to figure out?
> 
>> Its really only an issue when linking, since it will pick up the wrong
>> libraries.
> 
> No, it won't. The libraries come from the linker.

Our cross platform programs have libraries that we build to link to them.
We put them lib and lib64 directories depending on what platform we are building for.
We switch to the correct library using the mkspec of the version of Qt we are building with in the qmake project file:

linux-g++-64{
message(Building for linux 64-bit)
LIBS += -L../lib64
}
linux-g++-32{
message(Building for linux 32-bit)
LIBS += -L../lib 
}
linux-g++{
message(Building for linux-g++)
LIBS += -L../lib
}
win32-g++{
message(Building for windows 32-bit)
LIBS += -L../lib
}
win64-g++{
message(Building for windows 64-bit)
LIBS += -L../lib64
}
macx-clang{
message(Building for macx-clang)
LIBS += -L../lib64
}

Thus the project file can travel from platform to platform and access the correct libraries.
Seems to work well for us.

Karl




More information about the Interest mailing list