title: ld: symbol(s) not found for architecture x86_64 clang: error:
body: <p>This is for a Mac using Eclipse</p>
  
  <pre><code>#include &lt;iostream&gt;
  using namespace std;
  
  int main() {
   cout &lt;&lt; "!!!Hello, world!!!" &lt;&lt; endl;
   return 0;
  }
  </code></pre>
  
  <p>Here is the compiler output:</p>
  
  <pre class="lang-none prettyprint-override"><code>Invoking: MacOS X C++ Linker g++ -o "Lab2" ./secondlab.o
  Undefined symbols for architecture x86_64: "_main", referenced from: implicit entry/start for main executable ld: symbol(s) not found for architecture x86_64
  clang: error: linker command failed with exit code 1 (use -v to see invocation)
  make: *** [Lab2] Error 1
  </code></pre>