cmake::helloworld

ubuntu16.04 

cmake安装

apt-get install cmake

1、创建 CMakeLists.txt , main.cpp

2、cmake . 生成 makefile

3、遇到错误cmake: /usr/local/lib/libcurl.so.4: no version information available (required by cmake)  -> 解决方案

扫描二维码关注公众号,回复: 6495960 查看本文章

  locate libcurl.so.4

4、cmake . 重新生成makefile

5、make 生成可执行文件

二 、编译工程,构建过程产生的临时文件等文件与源码隔离,避免源码被污染。

猜你喜欢

转载自www.cnblogs.com/osbreak/p/11028447.html