title: Qt error: skipping incompatible /usr/lib/gcc/x86_64-redhat-linux/4.8.5/../../../libGL.so when searching for -lGL
body: <p><strong>Qt 5.7.0 GCC 4.9.1</strong>
  I created a simple widget project (<strong>no single code written, no settings changed,</strong> only drag a few controls to the form) right after installing Qt and did a test compile. I got error messages:</p>
  
  <pre><code>:-1: error: skipping incompatible /usr/lib/gcc/x86_64-redhat-linux/4.8.5/../../../libGL.so when searching for -lGL
  :-1: error: skipping incompatible /lib/libGL.so when searching for -lGL
  :-1: error: skipping incompatible /usr/lib/libGL.so when searching for -lGL 
  :-1: error: cannot find -lGL
  :-1: error: collect2: error: ld returned 1 exit status
  </code></pre>
  
  <p>I reckon that it was trying to link to the 32 bit OpenGL in my 64 bit machine. /usr/lib/gcc/x86_64-redhat-linux/4.8.5/../../../libGL.so is indeed located in /usr/lib/libGL. The 64 bit version, I think, is the one in /usr/lib64/libGL. How can I change the linking path so that it will link to the right library?  </p>