Setting the LINK variable in the Makefile generated by qmake (5.0)

I use qmake to create a makefile. In my spec file, I redefine CXX and CC as such:

QMAKE_CC=/home/foo/gcc-4.7.2/bin/gcc QMAKE_CXX=/home/foo/gcc-4.7.2/bin/g++ 

Now created Makefile uses these versions. However, there is a LINK variable in the generated makefile that points to g ++. Not /home/foo/gcc-4.7.2/bin/g++ .

This leads to the failure of my assembly at the last stage when compiling the executable file from all generated object files.

How do I get qmake to install LINK on /home/foo/gcc-4.7.2/bin/g++ in the generated Makefile?

I am currently changing LINK manually to make it work.

+4
source share
1 answer

You can override LINK in the same way:

QMAKE_LINK = / house / foo / gcc-4.7.2 / bin / g ++

+2
source

Source: https://habr.com/ru/post/1496191/


All Articles