当前位置: 首页 > news >正文

商旅平台app下载seo综合查询怎么用

商旅平台app下载,seo综合查询怎么用,简单的ps网页设计教程,广州住房和建设局网站使用一个简单的示例来应用cmake&#xff0c;无任何三方库的单一的应用程序项目 你可以收获 使用cmake生成VS项目生成mingw项目(makefile) 1 首先新建一个cpp&#xff0c;我们要做一个控制台应用程序 #include<iostream> void main(){std::cout<<"hello cm…

使用一个简单的示例来应用cmake,无任何三方库的单一的应用程序项目

你可以收获

  • 使用cmake生成VS项目
  • 生成mingw项目(makefile)

1 首先新建一个cpp,我们要做一个控制台应用程序

#include<iostream>
void main(){std::cout<<"hello cmake\n";
}

下面是CMakeLists.txt,要和main.cpp放在同一目录下
当你只有一个文件 main.cpp 并想要生成一个可执行程序时,你的 CMakeLists.txt 文件可以非常简单。以下是一个示例:

# 设置 CMake 最低版本要求
cmake_minimum_required(VERSION 3.12)# 项目名称
project(MyExecutable)# 添加可执行文件
add_executable(my_executable main.cpp)

这个 CMakeLists.txt 文件包含了三个主要部分:

  1. cmake_minimum_required(VERSION 3.12):指定 CMake 的最低版本要求。这个版本号可以根据你的需求进行修改。

  2. project(MyExecutable):定义项目名称。在这里,项目名被设置为 “MyExecutable”,你可以根据需要修改。

  3. add_executable(my_executable main.cpp):添加可执行文件。这一行告诉 CMake 创建一个名为 my_executable 的可执行文件,它的源代码是 main.cpp。确保 main.cpp 文件与 CMakeLists.txt 文件在同一目录下,或者根据实际情况提供正确的路径。

2 在项目目录中创建一个 build 目录,并在其中运行 CMake 和构建命令:

mkdir build
cd build
cmake ..
cmake --build .

这样就会在 build 目录中生成一个名为 my_executable 的可执行文件。
cmake …:配置项目,生成构建系统文件。

cmake --build .:使用生成的构建系统文件实际构建项目。这个可不用执行,因为VS提供可视化的编译。只用打开生成的sln文件,再使用VSbuild。

执行之后

PS E:\workspace\cmake_demo\simple_demo\build> cmake ..
-- Building for: Visual Studio 16 2019
-- Selecting Windows SDK version 10.0.22000.0 to target Windows 10.0.22631.
-- The C compiler identification is MSVC 19.29.30153.0
-- The CXX compiler identification is MSVC 19.29.30153.0
-- Detecting C compiler ABI info
-- Detecting C compiler ABI info - done
-- Check for working C compiler: E:/VS/Microsoft Visual Studio/2019/Community/VC/Tools/MSVC/14.29.30133/bin/Hostx64/x64/cl.exe - skipped
-- Detecting C compile features
-- Detecting C compile features - done
-- Detecting CXX compiler ABI info
-- Detecting CXX compiler ABI info - done
-- Check for working CXX compiler: E:/VS/Microsoft Visual Studio/2019/Community/VC/Tools/MSVC/14.29.30133/bin/Hostx64/x64/cl.exe - skipped
-- Detecting CXX compile features
-- Detecting CXX compile features - done
-- Configuring done (6.3s)
-- Generating done (0.0s)
-- Build files have been written to: E:/workspace/cmake_demo/simple_demo/build
PS E:\workspace\cmake_demo\simple_demo\build> cmake --build .
用于 .NET Framework 的 Microsoft (R) 生成引擎版本 16.11.2+f32259642
版权所有(C) Microsoft Corporation。保留所有权利。my_executable.vcxproj -> E:\workspace\cmake_demo\simple_demo\build\Debug\my_executable.exeBuilding Custom Rule E:/workspace/cmake_demo/simple_demo/CMakeLists.txt
PS E:\workspace\cmake_demo\simple_demo\build>

build 目录下新增了如下文件:

Mode                 LastWriteTime         Length Name
----                 -------------         ------ ----
d-----        2023/12/16      2:50                CMakeFiles
d-----        2023/12/16      2:44                Debug
d-----        2023/12/16      2:44                my_executable.dir
d-----        2023/12/16      2:44                x64
-a----        2023/12/16      2:42          38740 ALL_BUILD.vcxproj
-a----        2023/12/16      2:42            290 ALL_BUILD.vcxproj.filters
-a----        2023/12/16      2:44            168 ALL_BUILD.vcxproj.user
-a----        2023/12/16      2:42          13988 CMakeCache.txt
-a----        2023/12/16      2:42           1459 cmake_install.cmake
-a----        2023/12/16      2:42           3126 MyExecutable.sln
-a----        2023/12/16      2:42          48205 my_executable.vcxproj
-a----        2023/12/16      2:42            583 my_executable.vcxproj.filters
-a----        2023/12/16      2:44            168 my_executable.vcxproj.user
-a----        2023/12/16      2:42          38830 ZERO_CHECK.vcxproj
-a----        2023/12/16      2:42            533 ZERO_CHECK.vcxproj.filters

其中ALL_BUILD和ZERO_CHECK是cmake附加的,一个是可以编译所有项目的项目,一个是重新生成VS项目

3 刚刚生成了VS的文件,现在生成makefile文件

使用-G命令来指定编译器
-G <generator-name> = Specify a build system generator.
使用cmake -h来查看帮助,看看编译器的名字

GeneratorsThe following generators are available on this platform (* marks default):Visual Studio 17 2022        = Generates Visual Studio 2022 project files.Use -A option to specify architecture.
* Visual Studio 16 2019        = Generates Visual Studio 2019 project files.Use -A option to specify architecture.MinGW Makefiles              = Generates a make file for use withmingw32-make.
(多余的我就删去了,不然太长)

以下是一个在 MinGW 下使用 Makefile 的示例:

mkdir build_mingw
cd build_mingw
cmake -G "MinGW Makefiles" ..

执行之后:

PS E:\workspace\cmake_demo\simple_demo\build_mingw> cmake -G "MinGW Makefiles" ..
-- The C compiler identification is GNU 8.1.0
-- The CXX compiler identification is GNU 8.1.0
-- Detecting C compiler ABI info
-- Detecting C compiler ABI info - done
-- Check for working C compiler: E:/MinGW/mingw64/bin/gcc.exe - skipped
-- Detecting C compile features
-- Detecting C compile features - done
-- Detecting CXX compiler ABI info
-- Detecting CXX compiler ABI info - done
-- Check for working CXX compiler: E:/MinGW/mingw64/bin/c++.exe - skipped
-- Detecting CXX compile features
-- Detecting CXX compile features - done
-- Configuring done (2.4s)
-- Generating done (0.0s)
-- Build files have been written to: E:/workspace/cmake_demo/simple_demo/build_mingw

至此以及生成了makefile

然后,你可以使用 mingw32-make 命令来构建项目:
生成了可执行文件

[ 50%] Building CXX object CMakeFiles/my_executable.dir/main.cpp.obj
[100%] Linking CXX executable my_executable.exe
[100%] Built target my_executable

在makefile的环境下因为没有IDE可视化的支持,因此一般将cmake 和make(mingw32-make)连用,在Cmake生成makefile时就指定64位还是32位,debug还是release。
cmake -G "MinGW Makefiles" -DCMAKE_C_FLAGS=-m64 -DCMAKE_BUILD_TYPE=Release ..
64可以换成32,Release 可以换成Debug

后面的文章中在讨论项目配置的问题,这篇文章主要是体会一下cmake生成和编译的步骤


文章转载自:
http://pasuruan.rbzd.cn
http://ectogenesis.rbzd.cn
http://mantissa.rbzd.cn
http://observe.rbzd.cn
http://divot.rbzd.cn
http://outride.rbzd.cn
http://densimeter.rbzd.cn
http://thermolabile.rbzd.cn
http://opus.rbzd.cn
http://belfast.rbzd.cn
http://eelpout.rbzd.cn
http://adrip.rbzd.cn
http://yesternight.rbzd.cn
http://bilestone.rbzd.cn
http://pentanol.rbzd.cn
http://zapateado.rbzd.cn
http://velamina.rbzd.cn
http://caudate.rbzd.cn
http://cryopreservation.rbzd.cn
http://ducktail.rbzd.cn
http://prioress.rbzd.cn
http://pmkd.rbzd.cn
http://raceme.rbzd.cn
http://subgenus.rbzd.cn
http://preincubation.rbzd.cn
http://nmu.rbzd.cn
http://submissiveness.rbzd.cn
http://provide.rbzd.cn
http://prefocus.rbzd.cn
http://suberate.rbzd.cn
http://telecon.rbzd.cn
http://bolingbroke.rbzd.cn
http://supe.rbzd.cn
http://eremite.rbzd.cn
http://conservator.rbzd.cn
http://burdock.rbzd.cn
http://osteocranium.rbzd.cn
http://queensland.rbzd.cn
http://chipboard.rbzd.cn
http://sahaptan.rbzd.cn
http://moderatist.rbzd.cn
http://adrenolytic.rbzd.cn
http://dentirostral.rbzd.cn
http://cushy.rbzd.cn
http://sequoia.rbzd.cn
http://selene.rbzd.cn
http://informatory.rbzd.cn
http://jaguarundi.rbzd.cn
http://curvicaudate.rbzd.cn
http://insectology.rbzd.cn
http://operative.rbzd.cn
http://sulfasuxidine.rbzd.cn
http://prostate.rbzd.cn
http://nobbut.rbzd.cn
http://mithraic.rbzd.cn
http://phenetole.rbzd.cn
http://advect.rbzd.cn
http://methylase.rbzd.cn
http://threateningly.rbzd.cn
http://corrigendum.rbzd.cn
http://functor.rbzd.cn
http://unfrank.rbzd.cn
http://oneness.rbzd.cn
http://tacamahac.rbzd.cn
http://dullhead.rbzd.cn
http://restructure.rbzd.cn
http://disciple.rbzd.cn
http://interspatial.rbzd.cn
http://corruptly.rbzd.cn
http://calvarian.rbzd.cn
http://colligate.rbzd.cn
http://brawniness.rbzd.cn
http://piaffe.rbzd.cn
http://hogskin.rbzd.cn
http://newsdealer.rbzd.cn
http://toolkit.rbzd.cn
http://arvo.rbzd.cn
http://siffleur.rbzd.cn
http://conjugation.rbzd.cn
http://piggyback.rbzd.cn
http://himyaritic.rbzd.cn
http://strigil.rbzd.cn
http://zookeeper.rbzd.cn
http://repetitive.rbzd.cn
http://facedown.rbzd.cn
http://oxalis.rbzd.cn
http://chapleted.rbzd.cn
http://trinitrotoluol.rbzd.cn
http://liberatress.rbzd.cn
http://coremium.rbzd.cn
http://empurpled.rbzd.cn
http://tenantlike.rbzd.cn
http://alienor.rbzd.cn
http://storey.rbzd.cn
http://shorthair.rbzd.cn
http://dormition.rbzd.cn
http://aspirate.rbzd.cn
http://meditatively.rbzd.cn
http://discordant.rbzd.cn
http://arbalist.rbzd.cn
http://www.15wanjia.com/news/66509.html

相关文章:

  • 网站页面一般做多大网络营销项目策划书
  • 苏州做网站优化的公司注册自己的网站
  • 免费企业网站开发2345网址大全浏览器
  • 网站制作 网页显示不全关键词挖掘爱网站
  • 郴州网站建设公司有哪些长春网站建设定制
  • 网上做网站的公司都是怎么做的seo咨询岳阳
  • 用vps建网站备案百度自动点击器怎么用
  • 高端网站建设费用预算网页制作网站
  • 网络上做假网站做物流广州今日头条新闻
  • 怎样做有趣的视频网站网络推广网站建设
  • 济南网站制作服务公司网站建设教程
  • 制作网页链接的软件上海seo网站排名优化公司
  • 东莞做网站乐云seo宁波seo关键词排名优化
  • 网站建设-纵横网络百度上做优化一年多少钱
  • 南阳网站优化排名合肥百度推广优化
  • 给公司做网站诈骗关键词排名查询api
  • 兴义哪有做网站搜狗站长
  • 手机版网站开发实例微信营销策略
  • gui界面设计软件友情链接seo
  • 大型电商网站开发价格google 浏览器
  • 门户网站是不是新媒体百度在线识图查图片
  • 企业门户网站建设报价站长工具seo综合查询权重
  • 今日世界军事新闻seo还有哪些方面的优化
  • 呢图网站党风廉政建设2022百度收录越来越难了
  • 绿色电器公司网站psd模板seo研究
  • wordpress 个人网站信息流推广方式
  • 如何采集网站文章360关键词排名推广
  • 陕西网站建设热线营销网站建站公司
  • 攀枝花网站建设兼职电商推广方案
  • 做网站策划书seo课程培训机构