Kdevelop的安装-2种方法

使用 Ubuntu 的自带的源:

sudo apt-get update
sudo apt-get install kdevelop

 

这就可以了。update这部,假如不换源,更新非常慢。换源方法很简单,见下链接:

http://www.cnblogs.com/alexYuin/p/8891977.html

 

测试方法:

  1. 新建文件夹test;
  2. 在test中,新建 CMakeList.txt 和 helloSLAM.cpp,内容如下所示;
  3. 然后新建 build,进入build
  4. 分别执行命令:
cmake ..

make

./helloSLAM
  • 就看到结果了。

 

CMakeList.txt

# cmake version requirment
cmake_minimum_required(VERSION 2.8)
 
# project name.
project( helloSLAM )
 
# generate exectuable file.
add_executable( helloSLAM helloSLAM.cpp )

  

helloSLAM.cpp

#include <iostream>

int main()
{
    std::cout << "Hello world!" << std::endl;
    return 0;    
}    

  

 

使用官网的最新版本安装:

(待补充)

 

posted @ 2018-05-04 09:55  路边的十元钱硬币  阅读(1496)  评论(0编辑  收藏  举报