title: Building 64 bit exe using mingw gcc in codeblocks
body: <p>I am trying to build a 64 bit exe using minGW 64 bit. Which can be obtained from <a href="http://sourceforge.net/projects/mingw-w64/" rel="nofollow noreferrer">here</a> (Since the project is moving from sourceforge.net to mingw-w64.org I suggest to use <a href="http://mingw-w64.org" rel="nofollow noreferrer">mingw-w64.org</a>). Now my machine is a 64 bit machine and when I build my code through the compiler I get back a <code>32</code> bit exe. This is the output of the program</p>
  
  <pre><code>-------------- Build: Debug in TestCodeBlocks (compiler: MinGW GCC - 2/17/2015)---------------
  
  i686-w64-mingw32-g++.exe -Wall -std=c++98 -g  -c C:\Users\admin\TestCodeBlocks\main.cpp -o obj\Debug\main.o
  i686-w64-mingw32-g++.exe  -o bin\Debug\TestCodeBlocks.exe obj\Debug\main.o   
  Output file is bin\Debug\TestCodeBlocks.exe with size 58.17 KB
  </code></pre>
  
  <p>Any suggestions on why I might be getting back a 32 bit exe ?</p>
  
  <p>This is what my toolchain in codeblocks looks like</p>
  
  <p><img src="https://i.stack.imgur.com/0vTSW.png" alt="enter image description here"></p>
  
  <p>Update:</p>
  
  <p>I downloaded the 64 bit Mingw gcc compiler and this is what my settigns look like</p>
  
  <p><img src="https://i.stack.imgur.com/6F2Gg.png" alt="enter image description here"></p>
  
  <p>However when I attempt to run my program I get</p>
  
  <pre><code>x86_64-w64-mingw32-g++.exe -Wall -std=c++98 -g -m32  -c C:\Users\admin\TestCodeBlocks\main.cpp -o obj\Debug\main.o
  ar  -o bin\Debug\TestCodeBlocks.exe obj\Debug\main.o   
  ar: no operation specified
  Process terminated with status 1 (0 minute(s), 0 second(s))
  0 error(s), 0 warning(s) (0 minute(s), 0 second(s))
  </code></pre>