视觉SLAM十四讲第二章学习与课后题与随笔日记

今天正式进入实验室开始学习,嗯,周围都是不认识的研究生学长学姐,我们这一级还没有其他人来做毕设,偶尔搭不上话。不过好在实验室午饭晚饭一起吃,最后一天认识了八个人,还是挺开心的,就是学校大吃个饭也要在寒风中走半天很难受。买各种生活用品花了100多,万事开头贵(」・ω・)」?然后就是今天的主要工作。

视觉SLAM十四讲第二章

主要内容是linux下c++编程,cpp,lib,smakelist这类文件关联与使用。

前面出现过的问题:

P31-P32

make: *** 没有指明目标并且找不到 makefile。 停止。

未在删除前一次操作的中间文件后,进行build的程序工作。

课后习题:

T1

链接: https://pan.baidu.com/s/15dpH3f_EiQwjXLmpk5NSOw 提取码: dj1i

附录引用是英文,结果查完发现是中文。读完。

T3

g++ 输出名字与格式 编译内容

g++ -o hello.out helloSLAM.cpp

T4

cmake尝试build文件夹出现了上述问题,后如上解决。

kdevelop建立完工程就自带build文件夹存储中间文件。

T5

int main(int argc,char** argv)
{
	cout<<"Hello SLAM!"<<endl
	return 0;
}

这没有分号,所以错误。结果,你们懂得。

emin@emin-Intel:~/Temp/SLAM/test program/2.0/build$ make
[ 25%] Built target hello
[ 50%] Built target hello_shared
Scanning dependencies of target helloSLAM
[ 62%] Building CXX object CMakeFiles/helloSLAM.dir/helloSLAM.cpp.o
/home/emin/Temp/SLAM/test program/2.0/helloSLAM.cpp: In function ‘int main(int, char**)’:
/home/emin/Temp/SLAM/test program/2.0/helloSLAM.cpp:7:2: error: expected ‘;’ before ‘return’
  return 0;
  ^
CMakeFiles/helloSLAM.dir/build.make:62: recipe for target 'CMakeFiles/helloSLAM.dir/helloSLAM.cpp.o' failed
make[2]: *** [CMakeFiles/helloSLAM.dir/helloSLAM.cpp.o] Error 1
CMakeFiles/Makefile2:141: recipe for target 'CMakeFiles/helloSLAM.dir/all' failed
make[1]: *** [CMakeFiles/helloSLAM.dir/all] Error 2
Makefile:83: recipe for target 'all' failed
make: *** [all] Error 2

T6

会出现这样的错。

emin@emin-Intel:~/Temp/SLAM/test program/2.0/build$ make
[ 25%] Built target hello
[ 50%] Built target hello_shared
Scanning dependencies of target helloSLAM
[ 62%] Building CXX object CMakeFiles/helloSLAM.dir/helloSLAM.cpp.o
[ 75%] Linking CXX executable helloSLAM
[ 75%] Built target helloSLAM
Scanning dependencies of target useHello
[ 87%] Linking CXX executable useHello
CMakeFiles/useHello.dir/useHello.cpp.o:在函数‘main’中:
useHello.cpp:(.text+0x10):对‘printHello()’未定义的引用
useHello.cpp:(.text+0x15):对‘printHello()’未定义的引用
collect2: error: ld returned 1 exit status
CMakeFiles/useHello.dir/build.make:94: recipe for target 'useHello' failed
make[2]: *** [useHello] Error 1
CMakeFiles/Makefile2:178: recipe for target 'CMakeFiles/useHello.dir/all' failed
make[1]: *** [CMakeFiles/useHello.dir/all] Error 2
Makefile:83: recipe for target 'all' failed
make: *** [all] Error 2

T10

大多用上了,特征类似vs感觉。

T11

安装使用可以参考这个,个人感觉不如各种IDE。

猜你喜欢

转载自blog.csdn.net/unlimitedai/article/details/86212665
今日推荐