Ubuntu kdevelop使用说明

 在Ubuntu环境下,如果进行代码编辑或者调试、发布,完全依赖vim,对于新手来说有点困难,这里我们推荐使用kdevelop进行代码调试及发布。Kdevelop是一个自由、开放源代码的IDE,支持Linux,Solaris,FreeBSD,Mac OS X,WIndows 以及其他类Unix系统,它是一个功能全,可扩展的IDE。


 KDevelop支持多种不同语言,其中包括C、C++、脚本等。支持的构建系统包括GNU(automake)、cmake、qmake和自定义项目的make(如果您想使用自己的Makefile,KDevelop不会破坏它们的)以及不需要Makefile的脚本项目。


好,下面我们就介绍一下使用:


1. 安装GCC

sudo apt-get build-dep gcc
sudo apt-get install build-essential
2. 安装kdevelop

sudo apt-get install Kdevelop
3. 安装CMake

sudo apt-get install automake autoconf g++ libtool cmake

4.  PCL 安装

W: Failed to fetch http://ppa.launchpad.net/v-launchpad-jochen-sprickerhof-de/pcl/ubuntu/dists/xenial/main/binary-amd64/Packages  404  Not Found
在Software&Updates中,Other Software窗口将ppa.launchpad.net选项去掉,close即可。


接下来,我们就可以通过命令行或者Search窗口进行打开kdevelop了。


// 创建新工程

Project -> New from template. Select C++ -> No GUI (Cmake) -> Simple CMake-based C++ application and edit the name on the bottom of the window and click Next.

Then appears Version Control System. Select None and click Finish.
// 编译工程
Then it asks you to configure build. Click Ok. Now you should have new project visible on Projects list. You can build it by pressing F8 or selecting Project -> Build Selection.
// 配置启动项
To debug an application you must add launch configuration. This is done from Run-> Configure Launches.

Add new launch by pressing +. You need to edit the Project Target field to point a executable binary. It is same as your project name usually. Or you can just select executable to point the binary. You can also edit the launch name to be more informative than New Native Application Configuration by selecting it on left Launch Configurations list and pressing F2. Apply changes pressing Ok. Then you can add breakpoint to source code with right click -> Toggle Breakpoint. Debugging starts with Run -> Debug launch. On bottom of the screen you can select gdb console tab, and you can use enter commands gdb console.

// 导入工程

Project -> Open/Import project and select the folder of your project.  
Alternatively select your main makefile or <strong>CMakeLists.txt.</strong> Follow the wizard.

// 运行程序

Run -> Configure Launches, select your project to the left, press the plus-button. Make sure the type of the new launch configuration (give it a proper name!) is Native Application. Now go to the Project target field to the left and type in the path to your target. Start with your projects name, it has auto completion.


好,上面就是kdevelop的工程创建及调试流程,新建的工程通过后,会在目录生成发布的版本所需的所有文件。


具体参考该网址:

https://userbase.kde.org/KDevelop4/FAQ#How_do_I_import_an_existing_project.3F








如果你在Ubuntu上还没有安装KDevelop,你可以通过执行以下命令进行安装: ``` sudo apt-get install kdevelop ``` 如果你需要安装KDevelop的语言包,你可以执行以下命令来安装: ``` sudo apt-get install kdevelop-l10n ``` 另外,如果你没有安装aptitude软件包管理器,你需要先安装aptitude,然后才能执行aptitude命令来搜索KDevelop的相关内容: ``` sudo apt-get install aptitude aptitude search kdevelop ``` 这些命令将帮助你在Ubuntu上安装KDevelop并进行相应的配置。<span class="em">1</span><span class="em">2</span><span class="em">3</span> #### 引用[.reference_title] - *1* *3* [Kdevelopubuntu下的安装和汉化详细步骤](https://blog.csdn.net/qq_43147508/article/details/89177037)[target="_blank" data-report-click={"spm":"1018.2226.3001.9630","extra":{"utm_source":"vip_chatgpt_common_search_pc_result","utm_medium":"distribute.pc_search_result.none-task-cask-2~all~insert_cask~default-1-null.142^v93^chatsearchT3_1"}}] [.reference_item style="max-width: 50%"] - *2* [视觉SLAM十四讲 ch3 Ubuntu18.04 KDevelop使用及Eigen实践 入门笔记](https://blog.csdn.net/qq_41339558/article/details/126023845)[target="_blank" data-report-click={"spm":"1018.2226.3001.9630","extra":{"utm_source":"vip_chatgpt_common_search_pc_result","utm_medium":"distribute.pc_search_result.none-task-cask-2~all~insert_cask~default-1-null.142^v93^chatsearchT3_1"}}] [.reference_item style="max-width: 50%"] [ .reference_list ]
评论
添加红包

请填写红包祝福语或标题

红包个数最小为10个

红包金额最低5元

当前余额3.43前往充值 >
需支付:10.00
成就一亿技术人!
领取后你会自动成为博主和红包主的粉丝 规则
hope_wisdom
发出的红包
实付
使用余额支付
点击重新获取
扫码支付
钱包余额 0

抵扣说明:

1.余额是钱包充值的虚拟货币,按照1:1的比例进行支付金额的抵扣。
2.余额无法直接购买下载,可以购买VIP、付费专栏及课程。

余额充值