• CMake,win10,64位,简单配置测试


    https://cmake.org/download/  

    下载完成后,解压即可。

    创建文件夹,文件路径自己选择:

    这里,就近选择在桌面--创建HelloWorld档,在该文档下,分别创建CMakeLists.txt、HelloWorld.cpp文件,及bulid文件夹。

    其中,CMakeLists.txt文件内容如下:

    1 cmake_minimum_required(VERSION 3.10)
    2 project(HelloWorld)
    3 add_executable(HelloWorld HelloWorld.cpp)

    上述文件中,3.10是CMake版本,是电脑端刚刚安装的版本号。

    project处(HelloWorld)是cpp文件名。

    其中,HelloWorld.cpp文件内容如下:

    1 #include<iostream>
    2 using namespace std;
    3 int main()
    4 {
    5     cout << "Helloworld" << endl;
    6     system("pause");
    7     return 0;
    8 }

    运行打开CMake。

    上图功能说明:

    1、Where is the source code:表示CMakeList.txt所在文档位置;

    2、Where to build the binaries:表示保存生成的项目路径,可随意设置,这里采用上述设置的build文件路径。

    配置完成后,点击configure。

    在Specify the generator for this project,下拉选择 Visual Studio 10(根据自己电脑安装的版本选择)

    然后点击,Finish。

    然后,回到界面,点击Generate。

    紧接着,完成编译。

  • 相关阅读:
    十大开源CRM
    编码转换与网址解码
    1、ADO.NET相关对象一句话介绍
    接口与抽象类对比
    C#中的文件下载问题
    在WinForm下获取粘贴板中HTML格式的数据
    Exchange学习
    用Log Explorer恢复数据的基本操作
    iframe的问题
    再发一个C#版的日历
  • 原文地址:https://www.cnblogs.com/LQLin168/p/8438234.html
Copyright © 2020-2023  润新知