title: "Exec format error" running a binary created by g++
body: <p>I have a problem with my QTCreator-generated Makefile. Everything is working fine except when I try to create myself a new executable file for my tests, my terminal says: <code>bash: ./RunTests: cannot execute binary file: Exec format error
  </code></p>
  
  <p><strong>Here is how my MakeFile rule looks like:</strong></p>
  
  <pre><code>TESTS: ../WannaBeRPG/testes.cpp ../WannaBeRPG/hero.h ../WannaBeRPG/charinterface.h
      $(CXX) -c $(CXXFLAGS) $(INCPATH) -o RunTests ../WannaBeRPG/testes.cpp
  </code></pre>
  
  <p><strong>Flags are:</strong></p>
  
  <pre><code>CXX = g++
  CXXFLAGS = -pipe -g -std=gnu++0x -Wall -W -fPIC $(DEFINES)
  INCPATH = -I../WannaBeRPG -I. -I/usr/lib64/qt5/mkspecs/linux-g++
  DEFINES = -DQT_QML_DEBUG
  </code></pre>
  
  <p>If that is anyhow helpful here is my testes.cpp file:</p>
  
  <pre><code>#include &lt;gtest/gtest.h&gt;
  #include "hero.h"
  
  TEST(teee, HPTEST)
  {
      Hero myHero("Hika",150,100,0,0,0,0,0,0,0);
      EXPECT_EQ(100,myHero.getHP());
  }
  
  int main_tests(int argc, char* argv[])
  {
      testing::InitGoogleTest(&amp;argc,argv);
      return RUN_ALL_TESTS();
  }
  </code></pre>
  
  <p>I am using Fedora.
  Any ideas why does this works this way? Primary exec from this Makefile works completely fine. </p>