title: How do I configure cross-compile toolchain on QtCreator?
body: <p>I have built a Qt toolchain using Yocto. I installed it and set the environment variables running the script generated by Yocto. </p>
  
  <p>I open QtCreator and <a href="https://i.stack.imgur.com/uqAnS.png" rel="nofollow noreferrer">configure my cross-compiler kit</a> following these <a href="http://developer.toradex.com/knowledge-base/how-to-set-up-qt-creator-to-cross-compile-for-embedded-linux#Configure_Qt_Creator" rel="nofollow noreferrer">instructions</a>. 
  I'm unable to build this:</p>
  
  <pre><code>#include &lt;QApplication&gt;
  #include &lt;QPushButton&gt;
  
  
  int main(int argc, char **argv)
  {    
      QApplication a( argc, argv );    
      QPushButton hello( "Hello world!", 0 );
      hello.resize( 100, 30 );
      hello.show();    
      return a.exec();    
  }
  </code></pre>
  
  <p>Getting this error:</p>
  
  <pre><code>(.qtversion[qt_version_tag]+0x0):-1: error: undefined reference to `qt_version_tag'
  </code></pre>
  
  <p>So I try to build this instead:</p>
  
  <pre><code>#include &lt;stdio.h&gt;
  
  int main()
  {
     printf("Hello world!\n");
     return 0;
  }
  </code></pre>
  
  <p>It's ok. But when I deploy to my target and try to run it can't because it hasn't been compiled for target architecture (arm).</p>
  
  <pre><code>helloworld: ELF 32-bit LSB executable, Intel 80386, version 1 (SYSV), dynamically linked, interpreter /lib/ldd
  </code></pre>
  
  <p>There is also this warning which could be very indicative:</p>
  
  <pre><code>:-1: warning: "/usr/bin/gcc" is used by qmake, but "/opt/poky/2.1.1/sysroots/i686-pokysdk-linux/usr/bin/arm-poky-linux-gnueabi/arm-poky-linux-gnueabi-gcc" is configured in the kit.
  Please update your kit or choose a mkspec for qmake that matches your target environment better.
  </code></pre>
  
  <p><strike>I tried to set mkspec on my kit configuration but the result it's the same.</strike></p>