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

网站地图后台可以做吗seo站外优化最主要的是什么

网站地图后台可以做吗,seo站外优化最主要的是什么,简易手机app制作教程,网站开发会用到b s结构BUILD.gn文件怎么写,Gn Ninja编译一个Hello world程序的例子Demo 作者将狼才鲸创建日期2024-03-11 Ninja安装流程见:一个能直接运行的Ninja例子,build.ninja文件怎么写?Gn安装流程见:Ubuntu18.04下安装Gn软件 这是一…

BUILD.gn文件怎么写,Gn + Ninja编译一个Hello world程序的例子Demo

作者将狼才鲸
创建日期2024-03-11
  • Ninja安装流程见:一个能直接运行的Ninja例子,build.ninja文件怎么写?
  • Gn安装流程见:Ubuntu18.04下安装Gn软件

  • 这是一个简单的BUILD.gn配置文件
jim@ubuntu:~/0_Git/third_party_gn/examples/simple_build$ cat BUILD.gn 
# Copyright 2014 The Chromium Authors. All rights reserved.
# Use of this source code is governed by a BSD-style license that can be
# found in the LICENSE file.executable("hello") {sources = [ "hello.cc" ]deps = [":hello_shared",":hello_static",]
}shared_library("hello_shared") {sources = ["hello_shared.cc","hello_shared.h",]defines = [ "HELLO_SHARED_IMPLEMENTATION" ]
}static_library("hello_static") {sources = ["hello_static.cc","hello_static.h",]
}
  • 这是Gn官方的例子,在Gn的源码里面

    • 使用Ubuntu系统,安装Git、Ninja、Gn、Clang软件
    • git clone git@gitee.com:openharmony/third_party_gn.git 拉取源码,或者:
    • https://gitee.com/openharmony/third_party_gn/repository/archive/master.zip 下载源码
  • cd examples/simple_build/ 下载源码后进入其中的子目录

  • ls 先看看里面的文件

jim@ubuntu:~/0_Git/third_party_gn/examples/simple_build$ ls
build  BUILD.gn  hello.cc  hello_shared.cc  hello_shared.h  hello_static.cc  hello_static.h  README.md  tutorialjim@ubuntu:~/0_Git/third_party_gn/examples/simple_build$ cat hello.cc
// Copyright 2014 The Chromium Authors. All rights reserved.
// Use of this source code is governed by a BSD-style license that can be
// found in the LICENSE file.#include <stdio.h>#include "hello_shared.h"
#include "hello_static.h"int main(int argc, char* argv[]) {printf("%s, %s\n", GetStaticText(), GetSharedText());return 0;
}
  • gn gen -C out 按Gn规则文件生成Ninja配置文件
jim@ubuntu:~/0_Git/third_party_gn/examples/simple_build$ gn gen -C out
Done. Made 3 targets from 4 files in 45ms
  • cd out/ 进入输出目录,看看生成的什么内容
jim@ubuntu:~/0_Git/third_party_gn/examples/simple_build$ tree out/
out/
├── args.gn
├── build.ninja
├── build.ninja.d
├── obj
│   ├── hello.ninja
│   ├── hello_shared.ninja
│   └── hello_static.ninja
└── toolchain.ninja1 directory, 7 filesjim@ubuntu:~/0_Git/third_party_gn/examples/simple_build$ cat out/build.ninja
ninja_required_version = 1.7.2rule gncommand = ../../../../../../../usr/bin/gn --root=./.. -q --C --regeneration gen .pool = consoledescription = Regenerating ninja filesbuild build.ninja: gngenerator = 1depfile = build.ninja.dsubninja toolchain.ninjabuild hello_shared: phony ./libhello_shared.so
build hello_static: phony obj/libhello_static.a
build $:hello: phony hello
build $:hello_shared: phony ./libhello_shared.so
build $:hello_static: phony obj/libhello_static.abuild all: phony $hello $./libhello_shared.so $obj/libhello_static.adefault all
  • ninja 开始编译(和make命令类似)
jim@ubuntu:~/0_Git/third_party_gn/examples/simple_build/out$ ninja
[6/6] LINK hellojim@ubuntu:~/0_Git/third_party_gn/examples/simple_build/out$ tree
.
├── args.gn
├── build.ninja
├── build.ninja.d
├── hello
├── libhello_shared.so
├── obj
│   ├── hello.hello.o
│   ├── hello.ninja
│   ├── hello_shared.ninja
│   ├── hello_static.ninja
│   ├── libhello_shared.hello_shared.o
│   ├── libhello_static.a
│   └── libhello_static.hello_static.o
└── toolchain.ninja1 directory, 13 files
  • ./hello 运行编译后的可执行文件
jim@ubuntu:~/0_Git/third_party_gn/examples/simple_build/out$ ./hello 
Hello, world
  • 参考网址:
    • GN环境搭建
http://www.tj-hxxt.cn/news/57449.html

相关文章:

  • 2_网站建设的一般步骤包含哪些手机优化器
  • thinkphp做网站好吗3000块钱在朋友圈投放广告
  • 企业网站建设视频seo自学网官网
  • wordpress搜索结果整站seo免费咨询
  • 用网站的源代码怎么做网站百度网盘登录入口
  • 二级网站建设情况说明网站推广在线推广
  • php语言做的大网站杭州优化商务服务公司
  • 教育云平台网站建设百度seo推广计划类型包括
  • 网站建设服务器篇网站性能优化方法
  • 文秘写作网站建个人网站的详细步骤
  • 有那些网站可以做担保交易的关键词竞价排名是什么意思
  • 免费的网站后台seo建站是什么意思
  • 专门做招商的网站电商seo优化是什么
  • 网店推广实训报告惠州抖音seo策划
  • 刷信誉网站怎么做百度提问首页
  • 做齐鲁油官方网站深圳网络推广培训学校
  • 不锈钢公司网站源码 网站建设 产品3级分类asp源码西安百度推广客服电话多少
  • 百度网站安全检测东莞网络公司代理
  • 网站建设 上海网搜狗搜索引擎网页
  • 肥猫网站建设抖音关键词排名推广
  • 棋牌游戏网站怎么做品牌运营岗位职责
  • php网站开发的成功经历app推广拉新接单平台
  • 外贸公司有必要建设网站吗推广app平台
  • 什么叫网站建设四网合一百度网络营销
  • 如何设置的iis后台服务网站地址平面设计培训
  • 北京旅游型网站建设seo优化常识
  • 泰州网站制作哪家好网络黄页推广软件哪个好用
  • 叙述一个网站开发的流程网站分析案例
  • 外贸生意做哪个网站好网站搜索引擎优化方法
  • 企业网站建设费计入什么科目外贸独立站怎么做