title: Couldn’t understand kern.osversion ‘14.5.0
body: <p>While trying to see what gcc version I had on the system I got the following message</p>
  
  <pre><code>gcc --version
  gcc: warning: couldn’t understand kern.osversion ‘14.5.0
  gcc (GCC) 4.9.0
  Copyright (C) 2014 Free Software Foundation, Inc.
  This is free software; see the source for copying conditions.  There is NO
  warranty; not even for MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE
  
  which -a gcc
  /usr/local/bin/gcc
  /usr/local/bin/gcc
  /usr/bin/gcc
  </code></pre>
  
  <p>Then I tried Xcode and Sublime text with some code and got more errors while trying to build. </p>
  
  <p><strong>on sublime text:</strong></p>
  
  <pre><code>#include &lt;stdio.h&gt;
  
  int main (void)
  
  {
  
  /*Define variables*/
  
  float num1, num2, num3, media;
  
  printf("Insert some number:");
  
  scanf("%f",&amp;num1);
  
  }
  </code></pre>
  
  <blockquote>
    <p>error message: clang: error: no input files [Finished in 0.9s with
    exit code 1]</p>
  </blockquote>
  
  <p><strong>on Xcode:</strong>       </p>
  
  <pre><code>#include &lt;stdio.h&gt;
  
  int main ()
  
  {
  
  int num;
  
  printf("Write a number:");
  
  scanf("%d",&amp;num);
  
  getchar();
  
  }
  </code></pre>
  
  <blockquote>
    <p>error message: 2 duplicate symbols for architecture x86_64    Linker
    command failed with exit code 1</p>
  </blockquote>
  
  <pre><code>ld /Users/*****/Library/Developer/Xcode/DerivedData/C++_Programming-gsftvvhqrpzzfdaav/Build/Products/Debug/C++\
  Programming normal x86_64
  cd "/Users/*****/Desktop/C++/C++ Programming"
  export MACOSX_DEPLOYMENT_TARGET=10.10
      /Applications/Xcode.app/Contents/Developer/Toolchains/XcodeDefault.xctoolchain/usr/bin/clang++ -arch x86_64 -isysroot /Applications/Xcode.app/Contents/Developer/Platforms/MacOSX.platform/Developer/SDKs/MacOSX10.10.sdk
   -L/Users/*******/Library/Developer/Xcode/DerivedData/C++_Programming-gsftvvhqrpzzfdaa/Build/Products/Debug
   -F/Users/******/Library/Developer/Xcode/DerivedData/C++_Programming-gsftvvhqrpzzfda/Build/Products/Debug
   -filelist /Users/****/Library/Developer/Xcode/DerivedData/C++_Programming-gsftvvhqr/Build/Intermediates/C++\
   Programming.build/Debug/C++\
   Programming.build/Objects-normal/x86_64/C++\ Programming.LinkFileList
   -mmacosx-version-min=10.10 -stdlib=libc++ -Xlinker -dependency_info -Xlinker /Users/****/Library/Developer/Xcode/DerivedData/C++_Programming-gsftvvhqrpzzf/Build/Intermediates/C++\
   Programming.build/Debug/C++\
   Programming.build/Objects-normal/x86_64/C++\
   Programming_dependency_info.dat -o
   /Users/***/Library/Developer/Xcode/DerivedData/C++_Programming-gsftvvhqrpzzfdBuild/Products/Debug/C++\
   Programming
  </code></pre>
  
  <blockquote>
    <p>duplicate symbol _main in:
        /Users/*******/Library/Developer/Xcode/DerivedData/C++_Programming-gsftvvhqrpzz/Build/Intermediates/C++
    Programming.build/Debug/C++
    Programming.build/Objects-normal/x86_64/Add.o
        /Users/******/Library/Developer/Xcode/DerivedData/C++_Programming-gsftvvhqrpz/Build/Intermediates/C++
    Programming.build/Debug/C++
    Programming.build/Objects-normal/x86_64/main.o duplicate symbol _main
    in:
        /Users/*****/Library/Developer/Xcode/DerivedData/C++_Programming-gsftvvhqr/Build/Intermediates/C++
    Programming.build/Debug/C++
    Programming.build/Objects-normal/x86_64/Add.o
        /Users/******/Library/Developer/Xcode/DerivedData/C++_Programming-gsftvvhqrpzz/Build/Intermediates/C++
    Programming.build/Debug/C++
    Programming.build/Objects-normal/x86_64/C++.o ld: 2 duplicate symbols
    for architecture x86_64 clang: error: linker command failed with exit
    code 1 (use -v to see invocation)</p>
  </blockquote>
  
  <p>Any suggestions on how to fix this error</p>
  
  <p>Thanks</p>