Linux安装运行C++的环境时候遇到的小问题
1.解决:Gtk-Message: Failed to load module “canberra-gtk-module”
执行下面的命令:
sudo apt-get install libcanberra-gtk-module
2.解决: OpenJDK 64-Bit Server VM warning: Ignoring option MaxPermSize; support was removed in 8.0
窗口提示我们的错误位置
An error has occurred. See the log file
/home/warmtree/.eclipse/org.eclipse.platform_3.8_155965261/configuration/1568135861663.log
但是用whereis eclipse并没有找到相关路径。
没有解决错误,打算卸载eclipse,重新安装一个IDE。Ubuntu系统使用如下,
sudo apt-get remove eclipse*
哇,ls 和cd 命令是真的好用,不用自己背诵文件的路径就可以找到相应的位置了。
在不下载编译器的情况下可以直接简单运行我们的C++文件,具体参考下面的链接进行学习。
在Linux系统下编译并执行C++程序
Linux下CMakeLists.txt编译C++程序笔记
Linux系统下Eclipse的安装
哇呀呀,我就是想要在Linux下学习C++,为什么这么复杂,抓狂.jpg…继续下载我的C++IDE,
首先,在Eclipse的官网上下载Linux的压缩包。
其次,Linux下安装Eclipse
C++课堂回顾
我们对比实现了同一功能的两种代码,我们偏向选择简单的已有function。
for (int i=0;i<5;++i){
if(v[i]==2)
return i;
}
find(v,2);
//the best way to write a code
//is theway we do not need to write a comment.
such as find (v,2)
另外,用structure robot 的方式来定义我们的机器人。
std::vector<Robot> robots(10);
robots[0].x == ...
//after.,we find the content in the robot structure
我们写代码的目的尽量达到6个月以后自己还能看懂。
最后一个TIP:
We compile little by little,Only because we read the compile message,we solve the problem.