title: How to cross compile with mingw on linux using Code::Blocks?
body: <p>So I was using the <code>i586-mingw32msvc</code> compiler on linux to compile for windows. The Code::Blocks was configured like in <a href="http://wiki.codeblocks.org/index.php?title=Code%3a%3aBlocks_and_Cross_Compilers" rel="nofollow">this</a> site. Everything was fine until I tried to compile <strong>C++11</strong> code and the compiler said: <code>cc1plus: error: unrecognized command line option "-std=c++0x"</code>, then I jus realized that the mingw32 compiler is too old for C++11 code.</p>
  
  <p>So I installed the <code>mingw-w64</code> and in Code::Blocks in menu Settings->Compiler->Toolchain I changed <code>i586-mingw32msvc</code> to <code>i686-w64-mingw32</code>. The searching directories has been changed too.</p>
  
  <p>Now when I try to compile <strong>C++11</strong> code I get this (Build log):</p>
  
  <pre><code>i686-w64-mingw32-g++ -Wall -fexceptions  -std=c++0x  -DWINVER=0x0400 -D__WIN95__ -D__GNUWIN32__ -DSTRICT -DHAVE_W32API_H -D__WXMSW__ -D__WINDOWS__   -I/usr/i686-w64-mingw32/include  -c /home/me/program/p1/main.cpp -o obj/Release/win/main.o
  i686-w64-mingw32-g++ -L/usr/i686-w64-mingw32/lib  -o bin/Release/win/p1 obj/Release/win/main.o   -lstdc++ -lgcc -lodbc32 -lwsock32 -lwinspool -lwinmm -lshell32 -lcomctl32 -lctl3d32 -lodbc32 -ladvapi32 -lodbc32 -lwsock32 -lopengl32 -lglu32 -lole32 -loleaut32 -luuid  
  Output size is 107,04 KB
  Process terminated with status 0 (0 minutes, 0 seconds)
  0 errors, 0 warnings (0 minutes, 0 seconds)
  </code></pre>
  
  <p>and Build Messages shows only one line below:</p>
  
  <pre><code>||=== Build finished: 0 errors, 0 warnings (0 minutes, 0 seconds) ===|
  </code></pre>
  
  <p>like nothing was compiled. Anyone knows what happend?</p>