title: Library function behaves differently if compiled in Qt Creator
body: <p>I have a <code>c</code> program, that if I build it in the shell with this command:</p>
  
  <pre><code>gcc -o simpledemo -fpic -fsigned-char -DPLATFORM_LINUX -Iinclude/ simpledemo.c ../AcapelaLibs/libbabile.a -lstdc++
  </code></pre>
  
  <p>it compiles, runs, and produces the expected output.</p>
  
  <p><strong>gcc info:</strong></p>
  
  <pre><code>/usr/bin/gcc
  gcc (Ubuntu 4.8.4-2ubuntu1~14.04.1) 4.8.4
  </code></pre>
  
  <p>However, if I compile it with Qt Creator (Qt 5.5.1), it compiles and runs but a NULL value is returned from a function of the library I use.</p>
  
  <p><strong>Qt uses the following <code>g++</code>:</strong></p>
  
  <pre><code>/usr/bin/g++
  g++ (Ubuntu 4.8.4-2ubuntu1~14.04.1) 4.8.4
  </code></pre>
  
  <p>I think it might be something with the compiler flags. This is what I'm doing in Qt to match the shell command:</p>
  
  <p>in <code>.pro</code> file:</p>
  
  <pre><code>QMAKE_CXXFLAGS  += -DPLATFORM_LINUX
  INCLUDEPATH     += $$PWD/include/
  </code></pre>
  
  <p>I think the <code>INCLUDEPATH</code> is OK because I can access files there from within my code (they are recognizable).</p>
  
  <p>And note that in the shell compilation I use a library <code>../AcapelaLibs/libbabile.a</code>, so in Qt I click <strong>Add Library...</strong> and choose that same library, and Qt adds it to the <code>.pro</code> file. Also here I can access library functions from within my code.</p>
  
  <p>The problem is that a function from <strong>libbabile.a</strong> returns NULL if I compile and run from Qt (or compile in Qt and run from shell).</p>
  
  <p>What's the difference between the 2 methods that makes one of them succeed and the other fail?</p>