ubuntu下编译小知识点

1 #改变编译器选项
2 SET(CMAKE_C_COMPILER"g++")
3 #出现如下错误:添加C++11特性
4 #error: #error This file requires compiler and library support for the ISO C++ 2011 standard. This support must be enabled with the -std=c++11 or -std=gnu++11 compiler options.
5  #error This file requires compiler and library support \
6 #添加如下语句
7 SET( CMAKE_CXX_FLAGS "-std=c++11 -O3")
8 #设置编译模式
9 SET(CMAKE_BUILD_TYPE "DEBUG"

ubuntu 使用ssh远程连接的时候打开图形的文件夹
#nautilus /文件夹名字

把文件夹拷贝到另一个地方进行重新编译文件的时候,需要把build里面的文件删除了重新编译。

有些时候怎么在CMakeLists.txt里面添加路径都没有用
都显示找不到#include <sophus/so3.hpp>文件,在目录中去找发现原来文件的名字如下#include <sophus/so3.h>,hpp和h文件是有区分的。

首先切换到自己的ROS工作空间: $ cd ~/catkin_ws
如果你想编译整个工作空间里面的包:$ catkin_make
如果你只想编译工作空间某一个包:$ catkin_make  -DCATKIN_WHITELIST_PACKAGES= "包名"
例如:
$ catkin_make  -DCATKIN_WHITELIST_PACKAGES="beginner_tutorials"

posted on 2018-06-11 19:36  Healter  阅读(213)  评论(0编辑  收藏  举报

导航