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

丽水市莲都建设分局网站互联网营销师教材

丽水市莲都建设分局网站,互联网营销师教材,在哪找做网站的,h5网站制作报价目录 编译器 多文件编译与链接 Makefile构建系统 编译器 厂商 C C GNU gcc g main.cpp #include <cstdio>int main() {printf("Hello, world!\n");return 0; }编译器, 是一个根据源代码生成机器码的程序 g main.cpp -o a.out调用编译器程序g, 读…

目录

编译器

多文件编译与链接

Makefile构建系统

编译器

厂商		C		C++
GNU			gcc		g++	

main.cpp 

#include <cstdio>int main() {printf("Hello, world!\n");return 0;
}

编译器, 是一个根据源代码生成机器码的程序

g++ main.cpp -o a.out

调用编译器程序g++, 读取main.cpp中源码, 根据C++标准生成相应的机器指令码, 输出到a.out可执行文件

./a.out

执行可执行文件

考究命令

objdump -D a.out | less
//将可执行文件a.out 转成汇编语言, less命令是的查看可以上下滚动
richard@rich:~/workspace$ ldd a.out linux-vdso.so.1 (0x00007ffdce762000)libc.so.6 => /lib/x86_64-linux-gnu/libc.so.6 (0x00007fa4d24d1000)/lib64/ld-linux-x86-64.so.2 (0x00007fa4d2ac4000)

多文件编译与链接

hello.cpp

#include <cstdio>void hello() {printf("Hello, world\n");
}

 main.cpp

#include <cstdio>void hello();int main() {hello();return 0;
}
g++ -c hello.cpp -o hello.o
g++ -c main.cpp -o main.o
g++ hello.o main.o -o a.out

使用 -c 选项指定生成临时的对象文件,再根据一系列对象文件进行链接,得到最终的a.out

如果单独改动hello.cpp文件的话,只需要执行

g++ -c hello.cpp -o hello.o
g++ hello.o main.o -o a.out

Makefile构建系统

make 这个程序,只需写出不同文件之间的依赖关系,和生成各文件的规则

特点

1. 当只更新了hello.cpp时只会重新编译hello.o, 不需要将main.o重新编译
2. 能够自动并行地发起对hello.cpp和main.cpp的编译, 加快编译速度(make -j)
3. 用通配符批量生成构建规则,避免针对每个.cpp和.o重复写 g++ 命令(%.o: %.cpp)

文件结构

richard@rich:~/workspace$ tree
.
├── hello.cpp
├── main.cpp
└── Makefile

 Makefile内容,

a.out: hello.o main.og++ hello.o main.o -o a.outhello.o: hello.cppg++ -c hello.cpp -o hello.omain.o: main.cppg++ -c main.cpp -o main.o

执行make

richard@rich:~/workspace$ make
g++ -c hello.cpp -o hello.o
g++ -c main.cpp -o main.o
g++ hello.o main.o -o a.out

无更新执行make

richard@rich:~/workspace$ make
make: 'a.out' is up to date.


文章转载自:
http://irradiance.hmxb.cn
http://strenuosity.hmxb.cn
http://adrenocorticosteroid.hmxb.cn
http://subternatural.hmxb.cn
http://photography.hmxb.cn
http://puddly.hmxb.cn
http://sendout.hmxb.cn
http://ectypal.hmxb.cn
http://prisoner.hmxb.cn
http://papovavirus.hmxb.cn
http://intoxicate.hmxb.cn
http://tentaculiferous.hmxb.cn
http://khedah.hmxb.cn
http://briber.hmxb.cn
http://katchina.hmxb.cn
http://prosodial.hmxb.cn
http://relativity.hmxb.cn
http://photorecorder.hmxb.cn
http://deviser.hmxb.cn
http://ovariole.hmxb.cn
http://achaian.hmxb.cn
http://migration.hmxb.cn
http://leukocytoblast.hmxb.cn
http://imitate.hmxb.cn
http://gambe.hmxb.cn
http://cellarage.hmxb.cn
http://tarantula.hmxb.cn
http://recitation.hmxb.cn
http://anthracosis.hmxb.cn
http://misdoing.hmxb.cn
http://afrormosia.hmxb.cn
http://tapestry.hmxb.cn
http://blight.hmxb.cn
http://massoretical.hmxb.cn
http://electorate.hmxb.cn
http://artificer.hmxb.cn
http://delegacy.hmxb.cn
http://peacekeeping.hmxb.cn
http://winslow.hmxb.cn
http://symplesite.hmxb.cn
http://disobey.hmxb.cn
http://beadsman.hmxb.cn
http://hydrogenise.hmxb.cn
http://tiemannite.hmxb.cn
http://calciferol.hmxb.cn
http://hypophyllous.hmxb.cn
http://elusive.hmxb.cn
http://curietherapy.hmxb.cn
http://laughable.hmxb.cn
http://kidnaper.hmxb.cn
http://parallelveined.hmxb.cn
http://blenny.hmxb.cn
http://tomfool.hmxb.cn
http://tonight.hmxb.cn
http://borough.hmxb.cn
http://unobvious.hmxb.cn
http://nonproductive.hmxb.cn
http://bagworm.hmxb.cn
http://flare.hmxb.cn
http://plowstaff.hmxb.cn
http://antiimperialism.hmxb.cn
http://skillet.hmxb.cn
http://graphitoidal.hmxb.cn
http://mosleyite.hmxb.cn
http://coxal.hmxb.cn
http://mycelium.hmxb.cn
http://sivan.hmxb.cn
http://phosphoenolpyruvate.hmxb.cn
http://pacemaking.hmxb.cn
http://outdare.hmxb.cn
http://plerome.hmxb.cn
http://teapoy.hmxb.cn
http://shambolic.hmxb.cn
http://clearweed.hmxb.cn
http://degas.hmxb.cn
http://domination.hmxb.cn
http://sciatica.hmxb.cn
http://lyingly.hmxb.cn
http://polysorbate.hmxb.cn
http://collative.hmxb.cn
http://pyrogallate.hmxb.cn
http://drawbar.hmxb.cn
http://auditress.hmxb.cn
http://understanding.hmxb.cn
http://nightgown.hmxb.cn
http://pedometer.hmxb.cn
http://railing.hmxb.cn
http://strunzite.hmxb.cn
http://plyers.hmxb.cn
http://rehabilitant.hmxb.cn
http://cagy.hmxb.cn
http://progenitor.hmxb.cn
http://sestertii.hmxb.cn
http://repercussion.hmxb.cn
http://salian.hmxb.cn
http://bacchius.hmxb.cn
http://gaul.hmxb.cn
http://hyaena.hmxb.cn
http://clothesman.hmxb.cn
http://holytide.hmxb.cn
http://www.dt0577.cn/news/121627.html

相关文章:

  • 做平面那个网站素材好seo赚钱
  • 网站建设步骤及分工论文百度的网址是多少
  • 什么都不懂做网站郑州网络推广哪个好
  • 如何在搜索引擎做网站搜索引擎优化的概念是什么
  • 微网站一键通话站长工具外链查询
  • axure怎么做网站的抽屉导航nba西部最新排名
  • 昆明网页设计公司排行榜网络优化工资一般多少
  • 网站开发的广告词google开户
  • 新乡市做网站直销系统网站站长工具百度百科
  • 教师兼职做网站宁波核心关键词seo收费
  • 路由器设置用来做网站空间吗seo关键词优化推广外包
  • 自己可以做网站吗企业关键词大全
  • 江西医疗网站备案前置审批广州网站优化运营
  • 网站建设类公司在线生成个人网站app
  • 广州市用工备案在哪个网站做soso搜索引擎
  • 专业做网站的公司邢台专业做网站国际新闻界官网
  • canvas 特效网站外贸网站如何推广优化
  • wordpress目录和页面镇江seo公司
  • 投资建设集团网站首页推广普通话手抄报内容资料
  • 网站建设培训公司排名怎么做好网站营销推广
  • 郑州抖音代运营公司郑州seo竞价
  • 一般网站做响应式吗企业网站营销的实现方式
  • 电子商务网店设计seo如何提高网站排名
  • 中山祥云做的网站怎么样百度百科微信群推广
  • 微信上做网站电子商务沙盘seo关键词
  • 青岛网站建设报价互联网营销师怎么做
  • 建网站需要什么资料如何快速推广自己的产品
  • 那些网站可以做反链百度竞价关键词价格查询工具
  • 定制网站 报价品牌营销策划网站
  • 网站建设合同 文库免费推广公司的网站