云题海 - 专业文章范例文档资料分享平台

当前位置:首页 > code blocks CB项目配置基础命令

code blocks CB项目配置基础命令

  • 62 次阅读
  • 3 次下载
  • 2025/7/1 3:03:01

File 菜单

New :新建( Empty filefile 、 class 、 project 、 build target ) 。

Recent projectsfiles :最近打开的项目 文件 。

Import projects : Dev-C++ Project 、 VC6 dswdsp 、 VC8 vcprojsln 。

Ctrl+Shift+S : Save all files 。

Save workspace (as) :将多个项目组织成一个工作空间,类似 VC 的 dswsln 。

Properties :文件信息 。

Ctrl+W : close current file (关闭当前文件) 。

Ctrl+Shift+W : close all files (关闭所有打开的文件) 。

Ctrl+Q : 退出 CodeBlocks 。

View 菜单

Shift+F2 :显示 隐藏左侧的 Management 。

F2 : 显示 隐藏底端的 Logs & Others 。

Edit 菜单

File encoding :在状态栏有当前文件的编码格式信息。

End of line mode :注意默认为 LF ( 'n' ),在 MS 中打开需要先用相关工具( UE 或 VS2005 )转换成 CRLF (“ rn” )。

F11 : swap headersource (切换头文件和实现文件)。

Ctrl+Shift+CToggle Comment : Comment (注释, C++ 风格: )。

Ctrl+Shift+X : Uncomment (取消注释)。

Stream Comment : 块注释, C 风格: 。

Ctrl+J : Auto-Complete (自动补齐关键字代码框架,例如 while (); )。

Ctrl+Shift+B : 括号匹配(类似 VC 的 Ctrl+] ) 。

Ctrl+Space : Complete code (完成单词) , 该快捷键提供输入只能提示 , Ctrl+Space 与 SCIM 冲突。

Ctrl+Shift+Space : Show call tip (调用提示) 。

Search 菜单

查找替换编辑功能

Ctrl+F : Find (当前文件查找)。

Ctrl+Shift+F : Find in files (支持 WorkspaceProjectDirectory 级别查找)。

F3Shift+F3 : Find NextPrevious (上下查找)。

Ctrl+R : Replace (当前文件替换)。

Ctrl +Shift +R : Replace in files (支持 WorkspaceProjectDirectory 级别替换)。

Goto : 定位导航功能( line 、 function 、 declarationimplementation )。

Ctrl+. : Goto implementation ,类似 VC 的 F12 。

Ctrl+Shift+. : Goto declaration ,类似 VC 的 Shift+F12 。

Ctrl+ Al t+. : Goto include file ,配合 F11 使用。

Project 菜单

直接在侧边栏 Management 右击项目名称,重点关注项目的“ properties” 和“ build options” 。

( 1 ) Project properties

Project settings→Pre compiled headers :指定是否使用预编译处理器生成 PCH 。

Project settings→Project dependencies :指定对工作空间内其他项目的依赖关系。

( 2 ) Project build options :编译链接选项。

Compiler settings→ Compiler flags :编译链接命令开关 , 如 -p ,- g (要求编译器生成调试信息) 。

Compiler settings→ Other options :一般为 pkg-config 的 --cflags 头文件 位置。

Compiler settings→#define : 预处理器 ( preprocessor ) ,例如 _UNIX 、 _POSIX 等。

Linker settings→ L ink libraries : 附加包含库 。

Linker settings→ Other l ink er libraries : 一般为 pkg-config 的— clibs 库文件 位置。

Search directories : 附加 头文件( Compiler ) 包含目录 、 附加 库文件( linker ) 包含目录 , 相对 .cbp 路径 。

Prepost build steps : 生成事件前 后处理 。

Custom variables :用户自定义宏变量 。

“Make” commands :

Build targets :可指定 platform (平台)、 type (项目类型)、 output filename (输出文件,相对 .cbp 路径)、 execution working dir (工作目录,相对 .cbp 路径)、 objects output dir (目标文件输出目录,相对 .cbp 路径)。

Add new virtual folder :添加虚拟文件夹分类管理源代码文件。

Project Notes :添加项目说明。

Project tree :调整项目在工作空间中的树结构。

Ctrl+Shift+ 上 下:调整顺序。

Alt+F5F6 :调整当前 激活 项目, Alt+F5 与 ubuntu 系统恢复窗口快捷键冲突。

Build 菜单

Ctrl +Shift+F9 : compile current file (编译当前文件,类似 VC 的 Ctrl+F7 )。

Ctrl+F9 : build (编译链接,类似 VC 的 F7 )。

F9 : buiid and run (编译链接运行,类似 VC 的 Ctrl+F5 )。

Ctrl+F 10 : run (运行)。

Ctrl+F11 : rebuild (重新编译链接)。

Clean 菜单: 清理项目。

Errors 菜单: Alt+F1Alt+F2 (查看错误)。

Select Target 菜单: DebugRelease 版本选择。

Build workspaceRebuild workspaceClean workspace

Debug 菜单

F8 : Start (开启调试,类似 VC 的 F5 )。

F5 : Toggle breakpoint (插入断点,类似 VC 的 F9 )。

F4 : run to cursor (执行到鼠标所在处),可跳过循环。

F7 : run nextline (单步调试,类似 VC 的 F10 )。

Shift+F7 : step into (进入函数内部调试,类似 VC 的 F11 )。

搜索更多关于: code blocks CB项目配置基础命令 的文档
  • 收藏
  • 违规举报
  • 版权认领
下载文档10.00 元 加入VIP免费下载
推荐下载
本文作者:...

共分享92篇相关文档

文档简介:

File 菜单 New :新建( Empty filefile 、 class 、 project 、 build target ) 。 Recent projectsfiles :最近打开的项目 文件 。 Import projects : Dev-C++ Project 、 VC6 dswdsp 、 VC8 vcprojsln 。 Ctrl+Shift+S : Save all files 。 Save workspace (as) :将多个项目组织成一个工作空间,类似 VC 的 dswsln 。 Properties :文件信息 。 Ctrl+W : close current file (关闭当前文件) 。 Ctrl+Shift+W

× 游客快捷下载通道(下载后可以自由复制和排版)
单篇付费下载
限时特价:10 元/份 原价:20元
VIP包月下载
特价:29 元/月 原价:99元
低至 0.3 元/份 每月下载150
全站内容免费自由复制
VIP包月下载
特价:29 元/月 原价:99元
低至 0.3 元/份 每月下载150
全站内容免费自由复制
注:下载文档有可能“只有目录或者内容不全”等情况,请下载之前注意辨别,如果您已付费且无法下载或内容有问题,请联系我们协助你处理。
微信:fanwen365 QQ:370150219
Copyright © 云题海 All Rights Reserved. 苏ICP备16052595号-3 网站地图 客服QQ:370150219 邮箱:370150219@qq.com