title: x86_64-pc-cygwin-gcc linker error
body: <p>I setup in my cygwin environment the x86_64-pc-cygwin-gcc package to get a recent gcc </p>
  
  <pre><code>$ x86_64-pc-cygwin-gcc --version
  x86_64-pc-cygwin-gcc (GCC) 4.8.1
  </code></pre>
  
  <p>I have a small code file that you can find <a href="http://pastebin.com/N9g8YG9t" rel="nofollow">here</a>
  to build i use the following line:</p>
  
  <pre><code> x86_64-pc-cygwin-gcc -std=c++11 -std=gnu++11 TreasureHunter.cpp
  </code></pre>
  
  <p>Compilation is OK, but I get several link error about std::istream see below. What is the issue does it means I missed a package during the setup ? </p>
  
  <pre><code>/cygdrive/c/Users/abuisson/AppData/Local/Temp/cc9qeGVh.o:TreasureHunter.cpp:(.text+0x60): undefined reference to `std::istream::operator&gt;&gt;(int&amp;)'
  /cygdrive/c/Users/abuisson/AppData/Local/Temp/cc9qeGVh.o:TreasureHunter.cpp:(.text+0x60): relocation truncated to fit: R_X86_64_PC32 against undefined symbol `std::istream::operator&gt;&gt;(int&amp;)'
  /cygdrive/c/Users/abuisson/AppData/Local/Temp/cc9qeGVh.o:TreasureHunter.cpp:(.text+0x7c): undefined reference to `std::istream::operator&gt;&gt;(int&amp;)'
  /cygdrive/c/Users/abuisson/AppData/Local/Temp/cc9qeGVh.o:TreasureHunter.cpp:(.text+0x7c): relocation truncated to fit: R_X86_64_PC32 against undefined symbol `std::istream::operator&gt;&gt;(int&amp;)'
  /cygdrive/c/Users/abuisson/AppData/Local/Temp/cc9qeGVh.o:TreasureHunter.cpp:(.text+0xc2): undefined reference to `std::basic_istream&lt;char, std::char_traits&lt;char&gt; &gt;&amp; std::operator&gt;&gt;&lt;char, std::char_traits&lt;char&gt; &gt;(std::basic_istream&lt;char, std::char_traits&lt;char&gt; &gt;&amp;, char&amp;)'
  /cygdrive/c/Users/abuisson/AppData/Local/Temp/cc9qeGVh.o:TreasureHunter.cpp:(.text+0xc2): relocation truncated to fit: R_X86_64_PC32 against undefined symbol `std::basic_istream&lt;char, std::char_traits&lt;char&gt; &gt;&amp; std::operator&gt;&gt;&lt;char, std::char_traits&lt;char&gt; &gt;(std::basic_istream&lt;char, std::char_traits&lt;char&gt; &gt;&amp;, char&amp;)'
  /cygdrive/c/Users/abuisson/AppData/Local/Temp/cc9qeGVh.o:TreasureHunter.cpp:(.text+0x11e): undefined reference to `std::istream::operator&gt;&gt;(int&amp;)'
  /cygdrive/c/Users/abuisson/AppData/Local/Temp/cc9qeGVh.o:TreasureHunter.cpp:(.text+0x11e): relocation
  truncated to fit: R_X86_64_PC32 against undefined symbol `std::istream::operator&gt;&gt;(int&amp;)'
  /cygdrive/c/Users/abuisson/AppData/Local/Temp/cc9qeGVh.o:TreasureHunter.cpp:(.text+0x2d2): undefined reference to `std::ios_base::Init::Init()'
  /cygdrive/c/Users/abuisson/AppData/Local/Temp/cc9qeGVh.o:TreasureHunter.cpp:(.text+0x2d2): relocation
  truncated to fit: R_X86_64_PC32 against undefined symbol `std::ios_base::Init::Init()'
  /cygdrive/c/Users/abuisson/AppData/Local/Temp/cc9qeGVh.o:TreasureHunter.cpp:(.text+0x2ed): undefined reference to `std::ios_base::Init::~Init()'
  /cygdrive/c/Users/abuisson/AppData/Local/Temp/cc9qeGVh.o:TreasureHunter.cpp:(.text+0x2ed): relocation
  truncated to fit: R_X86_64_PC32 against undefined symbol `std::ios_base::Init::~Init()'
  /usr/lib/gcc/x86_64-pc-cygwin/4.8.1/../../../../x86_64-pc-cygwin/bin/ld: /cygdrive/c/Users/abuisson/AppData/Local/Temp/cc9qeGVh.o: bad reloc address 0x0 in section `.pdata$_ZSt4__lgl'
  /usr/lib/gcc/x86_64-pc-cygwin/4.8.1/../../../../x86_64-pc-cygwin/bin/ld: final link failed: Invalid operation
  collect2: error: ld returned 1 exit status
  </code></pre>