参考:
一、C++、cmake环境
简单的配置:VS Code + msys2配置Windows下C/C++开发环境
VSCode配置C/C++环境
1、cmake报错
直接在vs code命令行执行:
cmake -S ./../C++/ -DCMAKE_CXX_COMPILER="E:/soft2/MinGW/bin/g++.exe" -DCMAKE_C_COMPILER="E:/soft2/MinGW/bin/gcc.exe" -G "MinGW Makefiles"
还是会路径不对
最后改到CMakeLists.txt
set(CMAKE_CXX_COMPILER “E:/soft2/MinGW/bin/g++.exe”)
set(CMAKE_C_COMPILER “E:/soft2/MinGW/bin/gcc.exe”)
再执行
cmake -S ./../C++/ -G "MinGW Makefiles"
二、Xshell、Xftp
1、进入官网选择免费授权页面
2、填好姓名邮箱,然后等链接下载即可,安装一直默认就能装好
三、VMware
下载官网
直接下载安装即可,有一定的试用日期
四、数据库mysql
安装8.0版本时,可能会遇到:Failed to start service MySQL80.
解决参考:
mysql 安装过程中的错误
1、安装g++
centOS系统安装g++
https://blog.51cto.com/u_12392997/4919403
2、镜像列表问题
【已解决】Error: Failed to download metadata for repo ‘appstream‘: Cannot prepare internal mirrorlist
https://blog.csdn.net/weixin_43252521/article/details/124409151
3、mysql.h头文件找不到
安装mysql-community-server来解决
[root@localhost ]# yum -y install mysql-community-server
Last metadata expiration check: 2:38:58 ago on Sun 09 Apr 2023 12:55:08 AM PDT.
No match for argument: mysql-community-server
Error: Unable to find a match: mysql-community-server
[root@localhost ]# wget -i -c http://dev.mysql.com/get/mysql57-community-release-el7-10.noarch.rpm
[root@localhost ]# yum -y install mysql57-community-release-el7-10.noarch.rpm
重新安装
[root@localhost ]# yum -y install mysql-community-server
The downloaded packages were saved in cache until the next successful transaction.
You can remove cached packages by executing ‘yum clean packages’.
Error: GPG check FAILED
[root@localhost ]# rpm --import https://repo.mysql.com/RPM-GPG-KEY-mysql-2022
[root@localhost ]# yum -y install mysql-community-server
4、还是找不到头文件:
./CGImysql/sql_connection_pool.h:6:10: fatal error: mysql/mysql.h: No such file or directory
#include <mysql/mysql.h>
^~~~~~~~~~~~~~~
安装依赖
[root@localhost ]# yum install mysql-devel
5、so找不到,通过加-L搜索路径解决
./log/log.h: In member function ‘void* Log::async_write_log()’:
./log/log.h:47:5: warning: no return statement in function returning non-void [-Wreturn-type]
}
^
/usr/bin/ld: cannot find -lmysqlclient
collect2: error: ld returned 1 exit status
make: *** [makefile:2: server] Error 1
参考:
fatal error :mysql.h:No such file or directory
https://bbs.csdn.net/topics/392696917
makefile 语法 /usr/bin/ld: cannot find -lxxxx
https://blog.csdn.net/u013693367/article/details/78929985?spm=1001.2101.3001.6650.9&utm_medium=distribute.pc_relevant.none-task-blog-2%7Edefault%7EBlogCommendFromBaidu%7ERate-9-78929985-blog-109496679.235%5Ev28%5Epc_relevant_default_base1&depth_1-utm_source=distribute.pc_relevant.none-task-blog-2%7Edefault%7EBlogCommendFromBaidu%7ERate-9-78929985-blog-109496679.235%5Ev28%5Epc_relevant_default_base1&utm_relevant_index=10
Centos安装MySQL
https://blog.csdn.net/weixin_42294130/article/details/123720781
Error: Unable to find a match: mysql-community-server
https://blog.csdn.net/qq_39840846/article/details/125840918
ip地址:
https://blog.csdn.net/qq_42455262/article/details/125117414
centos查看mysql端口
show global variables like ‘port’;
mysql密码:
https://www.linuxidc.com/Linux/2018-01/150126.htm
https://www.cnblogs.com/TD1900/p/14837062.html
CentOS 7 安装MySQL 5.7 或安装指定版本MySQL
https://cloud.tencent.com/developer/article/2086602
https://blog.csdn.net/HxiongGe/article/details/110733110
https://blog.csdn.net/qq_42561919/article/details/100007943