Chinaunix首页 | 论坛 | 博客
  • 博客访问: 9464166
  • 博文数量: 1750
  • 博客积分: 12961
  • 博客等级: 上将
  • 技术积分: 20091
  • 用 户 组: 普通用户
  • 注册时间: 2009-01-09 11:25
个人简介

偷得浮生半桶水(半日闲), 好记性不如抄下来(烂笔头). 信息爆炸的时代, 学习是一项持续的工作.

文章分类

全部博文(1750)

文章存档

2024年(26)

2023年(26)

2022年(112)

2021年(217)

2020年(157)

2019年(192)

2018年(81)

2017年(78)

2016年(70)

2015年(52)

2014年(40)

2013年(51)

2012年(85)

2011年(45)

2010年(231)

2009年(287)

分类: Windows平台

2016-03-25 09:01:23



1. Install MINGW64

Download and install . Assume that you install it under C:\mingw64.

2. Set up compiler

Open Code::Block. Go to Settings > Compiler. Under the drop down list of selected compiler, the GNU GCC Compiler should be selected by default. We will copy the settings of this compiler and then modify it.

Click on Copy and give a new name for the compiler that you are going to set up. You can name it whatever you want (e.g. GNU GCC Compiler (x64)).

codeblock - add new compiler

One last step, you need to update the toolchain under the tab Toolchain executables. Modify the compiler’s installation directory to the directory of MinGW64 (e.g C:\mingw64). Also update the following under Program Files:

C compiler: x86_64-w64-mingw32-gcc.exe
C++ compiler: x86_64-w64-mingw32-g++.exe
Linker for dynamic libs: x86_64-w64-mingw32-g++.exe
Linker for static libs: x86_64-w64-mingw32-gcc-ar.exe

codeblock - comiler settings - update toolchain

Now you can go ahead to use this compiler to compiler your program.

3. Set up debugger

With the above steps, you won’t be able to debug your program yet. You will probably get the following error message:

[code]
Starting the debuggee failed: No executable specified, use `target exec’.
Debugger finished with status 0
[/code]

Now you have to set up the debugger under Settings > Debugger…. Select on GDB/CDB debgger, and Create Config. In the popup window, enter the name for the configuration. I am calling it gdb64 here. Under Executable path, select the corresponding gdb debugger for mingw64.

codeblock - debugger

Finally, go back to the toolchain page for GNU GCC Compiler (x64), and switch the debugger to gdb64.

codeblock - compiler

This entry was posted in  and tagged  on .
阅读(5300) | 评论(0) | 转发(0) |
给主人留下些什么吧!~~