<?xml version="1.0"?>
<feed xmlns="http://www.w3.org/2005/Atom" xml:lang="en">
	<id>https://wiki.next.codeblocks.org/api.php?action=feedcontributions&amp;feedformat=atom&amp;user=Tjaalie</id>
	<title>Code::Blocks - User contributions [en]</title>
	<link rel="self" type="application/atom+xml" href="https://wiki.next.codeblocks.org/api.php?action=feedcontributions&amp;feedformat=atom&amp;user=Tjaalie"/>
	<link rel="alternate" type="text/html" href="https://wiki.next.codeblocks.org/index.php?title=Special:Contributions/Tjaalie"/>
	<updated>2026-10-19T02:26:16Z</updated>
	<subtitle>User contributions</subtitle>
	<generator>MediaWiki 1.45.3</generator>
	<entry>
		<id>https://wiki.next.codeblocks.org/index.php?title=64Bit_Windows&amp;diff=4879</id>
		<title>64Bit Windows</title>
		<link rel="alternate" type="text/html" href="https://wiki.next.codeblocks.org/index.php?title=64Bit_Windows&amp;diff=4879"/>
		<updated>2007-08-29T10:39:40Z</updated>

		<summary type="html">&lt;p&gt;Tjaalie: Compiling 64 bit code with code blocks&lt;/p&gt;
&lt;hr /&gt;
&lt;div&gt;== How-to compile amd64 code with Code::Blocks ==&lt;br /&gt;
(by Tjaalie)&lt;br /&gt;
&amp;lt;br&amp;gt;&amp;lt;br&amp;gt;&lt;br /&gt;
&#039;&#039;Requirements:&#039;&#039;&amp;lt;br&amp;gt;&lt;br /&gt;
- Code::Bocks (just get a nightly build)&amp;lt;br&amp;gt;&lt;br /&gt;
- Windows SDK ([http://www.microsoft.com/downloads/details.aspx?familyid=C2B1E300-F358-4523-B479-F53D234CDCCF&amp;amp;displaylang=en])&amp;lt;br&amp;gt;&lt;br /&gt;
&amp;lt;br&amp;gt;&lt;br /&gt;
&#039;&#039;Step1&#039;&#039;) Make sure you have a nightly build because I don’t think that RC2 supports all the needed functionality to setup the compiler.&amp;lt;br&amp;gt;&lt;br /&gt;
&amp;lt;br&amp;gt;&lt;br /&gt;
&#039;&#039;Step2&#039;&#039;) Install the Windows SDK, you can deselect all the .net stuff because we won’t be needing it.&lt;br /&gt;
*tip If you deselect the documentation parts you reduce the download size to under 100mb.&lt;br /&gt;
&amp;lt;br&amp;gt;&lt;br /&gt;
&#039;&#039;Step3&#039;&#039;) Start Code::Blocks and go to ‘Settings-&amp;gt;Compiler and Debugger settings’, then select ‘Microsoft Visual C++ 2005’ from the dropdown box and click the copy button. Now choose a name I used ‘Windows SDK x64’ but you can name it whatever you like.&amp;lt;br&amp;gt;&lt;br /&gt;
&amp;lt;br&amp;gt;&lt;br /&gt;
&#039;&#039;Step4&#039;&#039;) Now with ‘Windows SDK x64’ as the selected compiler go to the ‘Toolchain executables’ tab and &#039;&#039;&#039;EMPTY&#039;&#039;&#039; the directory text box. Then click the ‘Additional Paths’ tab inside the ‘Toolchain executables’ tab. Remove the directory that goes to your Visual C++ 2005 install dir &#039;&#039;&#039;NOT&#039;&#039;&#039; the debug one and add the following directory’s:&amp;lt;br&amp;gt;&lt;br /&gt;
- C:\Program Files\Microsoft SDKs\Windows\v6.0\Bin\x64&amp;lt;br&amp;gt;&lt;br /&gt;
- C:\Program Files\Microsoft SDKs\Windows\v6.0\VC\Bin\x64&amp;lt;br&amp;gt;&lt;br /&gt;
&amp;lt;br&amp;gt;&lt;br /&gt;
&#039;&#039;Step5&#039;&#039;) Now go to the ‘Search Directories’ tab and remove all items under the ‘Compiler’, ‘Linker’ and ‘Resource compiler’ tabs. And then add the following,&lt;br /&gt;
Compiler:&amp;lt;br&amp;gt;&lt;br /&gt;
- C:\Program Files\Microsoft SDKs\Windows\v6.0\VC\INCLUDE&amp;lt;br&amp;gt;&lt;br /&gt;
- C:\Program Files\Microsoft SDKs\Windows\v6.0\Include&amp;lt;br&amp;gt;&lt;br /&gt;
Linker:&amp;lt;br&amp;gt;&lt;br /&gt;
- C:\Program Files\Microsoft SDKs\Windows\v6.0\VC\LIB\x64&amp;lt;br&amp;gt;&lt;br /&gt;
- C:\Program Files\Microsoft SDKs\Windows\v6.0\Lib\x64&amp;lt;br&amp;gt;&lt;br /&gt;
Resource Compiler:&amp;lt;br&amp;gt;&lt;br /&gt;
- None&amp;lt;br&amp;gt;&lt;br /&gt;
&amp;lt;br&amp;gt;&lt;br /&gt;
&#039;&#039;Step6&#039;&#039;) Create a new project (console project) and select our new ‘Windows SDK x64’ compiler as the compiler to use. Now in the generated code add the following line:&amp;lt;br&amp;gt;&lt;br /&gt;
*cout &amp;lt;&amp;lt; “sizeof(void*) = ” &amp;lt;&amp;lt; sizeof(void*) &amp;lt;&amp;lt; &amp;quot;;&amp;quot; &amp;lt;&amp;lt; endl;&amp;lt;br&amp;gt;&lt;br /&gt;
Hit the compile button and off we go. When we execute the program it appears to have a 8byte long address (64 bits).&amp;lt;br&amp;gt;&lt;br /&gt;
&amp;lt;br&amp;gt;&lt;br /&gt;
&#039;&#039;Remarks&#039;&#039;) When you create a gui application Code::Blocks starts yelling at you about the PSDK, in fact the Windows SDK is the PSDK for Vista so you don’t need it, so you need to fill in a bogus path when creating the app (e.g. ‘c:\’) and then later remove the entries to the PSDK in ‘Build Options…-&amp;gt;Search Directories’. A new template would be cool but that’s something for another time.&lt;/div&gt;</summary>
		<author><name>Tjaalie</name></author>
	</entry>
</feed>