title: C++ Class Files Not building Binaries in Eclipse Mars Running on Linux OS
body: <p>New to C++ and getting the dreaded "Binaries not found" error while executing my code. This only happens when I have created a source file that includes the code for a Class. When I write programs that don't include a Class, this does not happen. For instance, this program creates binaries when I build the project for it and runs fine:</p>
  
  <pre><code>#include &lt;iostream&gt;
  using namespace std;
  
  int main()
  {
    cout &lt;&lt; "Hello World!";
  }
  </code></pre>
  
  <p>But when I try building a project for this file, the binaries don't get created:</p>
  
  <pre><code>#include &lt;iostream&gt;
  #include &lt;cstdlib&gt;
  #include &lt;ctime&gt;
  #include &lt;cstdio&gt;
  #include &lt;algorithm&gt;    // std::max
  
  using namespace std;
  
  class Measure {
  public:
  int key;
  string note;
  
  Measure() {
      key = 13;
      //Generate a random key
      while(key &gt; 12)
      {
          key = (rand() % 100) + 1;
      }
      note = startNote(key);
  }
  
  int getKey() {
      return key;
  }
  
  string getNote() {
          return note;
      }
  
  int triad(){
      int first = 0;
      int third = 0;
      int fifth = 0;
      while(first == third &amp;&amp; first == fifth )
      {
          first = (rand() % 100) + 1;
          third = (rand() % 100) + 1;
          fifth = (rand() % 100) + 1;
      }
      if (first &gt; third &amp;&amp; first &gt; fifth)
          return 0;
      else if(third  &gt; first &amp;&amp; third &gt; fifth)
          return 1;
      else
          return 2;
  }
  
  string startNote(int key){
      switch(key + triad())
      {
      case 1 :
          note = "A";
          break;
      case 2 :
          note = "A#";
          break;
      case 3 :
          note = "B";
          break;
      case 4 :
          note = "C";
          break;
      case 5 :
          note = "C#";
          break;
      case 6 :
          note = "D";
          break;
      case 7 :
          note = "D#";
          break;
      case 8 :
          note = "E";
          break;
      case 9 :
          note = "F";
          break;
      case 10 :
          note = "F#";
          break;
      case 11 :
          note = "G";
          break;
      case 12 :
          note = "G#";
          break;
      }
      return note;
  }
  
  
  
  ~Measure() {
      // TODO Auto-generated destructor stub
  }
  
  int main()
  {
      cout &lt;&lt; "Hello, world!" &lt;&lt; endl;
      return 0;
  }
  
  };
  </code></pre>
  
  <p>I've looked up problems similar to mine and the solutions don't work. I've tried changing my binary parser in the project properties menu to PE Windows Parser, Elf Parser and GNU Elf Parser. This doesn't seem to make a difference. Why does Eclipse generate binaries when building a project for some files and not others (e.g. my file above that contains a class called Measure?)</p>