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

更改host文件把淘宝指向自己做的钓鱼网站seo综合查询工具有什么功能

更改host文件把淘宝指向自己做的钓鱼网站,seo综合查询工具有什么功能,用vs与dw做网站,西安SEO网站建设什么是库文件 单一模型 将程序中所有功能全部实现于一个单一的源文件内部。 编译时间长,不易于维护和升级,不易于协作开发。 分离模型 将程序中的不同的功能模块划分到不同的源文件中。 缩短编译时间,易于维护和升级,易于协…

什么是库文件

单一模型

将程序中所有功能全部实现于一个单一的源文件内部。

编译时间长,不易于维护和升级,不易于协作开发。

分离模型

将程序中的不同的功能模块划分到不同的源文件中。

缩短编译时间,易于维护和升级,易于协作开发。

库文件

对多个目标文件的管理比较麻烦,可以将多个目标文件统一整理成一个库文件。

库文件可以直接在其他C语言程序中直接调用。

可以简单的把库文件理解成一种代码仓库,它提供给使用者一些可以直接拿来用的变量,函数或者类。

库文件一般指的是计算机上的一类文件,分为两种,一种叫做静态库,一种叫做动态库。

静态库

概述

静态库的本质是将多个目标文件打包成一个文件。

链接静态库就是将库中被调用的代码复制到调用模块中。

静态库的扩展名是.a,比如libxxx.a

静态库的构建

1、编辑库的实现代码和接口声明

  • 计算模块:calc.h,calc.c
  • 显示模块:show.h,show.c
  • 接口文件:math.h

2、编译成目标文件

gcc -c calc.c
gcc -c show.c

3、打包成静态库

ar -r libmath.a calc.o show.o

实战案例:构建 libmath.a 静态库

准备源文件

calc.h

  • 定义加法:int add(int a, int b);
  • 定义减法:int sub(int a, int b);
#ifndef __CALC_H_
#define __CALC_H_int add(int a, int b);
int sub(int a, int b);#endif // __CALC_H_

calc.c

  • 简单的实现加法
  • 简单的实现减法
#include "calc.h"int add(int a, int b){return a + b;
}int sub(int a, int b){return a - b;
}

show.h

#ifndef __SHOW_H_
#define __SHOW_H_void show(int a, char* op, int b, int res);#endif // __SHOW_H_

show.c

#include <stdio.h>
#include "show.h"void show(int a, char* op, int b, int res){printf("%d %s %d = %d\n", a, op, b, res);
}
编译C源文件
gcc -c calc.c
gcc -c show.c
构建静态库
ar -r libmath.a calc.o show.o
使用静态库文件

main.c

#include <stdio.h>
#include "calc.h"
#include "show.h"int main(){int a = 11;int b = 22;int res = add(a, b);show(a, "+", b, res);return 0;
}

编译并运行文件,此时把静态库文件也带上:

gcc main.c libmath.a -o main && ./main

输出结果如下:

11 + 22 = 33
使用接口文件优化

当我们的库越来越大的时候,头文件也会越来越多,这个是让用户分别引入每个头文件是不人性化的。

这个时候,我们可以给库配套一个相应的头文件,这个头文件中引入需要的所有其他头文件这个。这个与库对应的头文件就是我们这个库的接口文件。

math.h

#ifndef __MATH_H_
#define __MATH_H_#include "calc.h"
#include "show.h"#endif // __MATH_H_

main.c

#include <stdio.h>
#include "math.h"int main(){int a = 11;int b = 22;int res = add(a, b);show(a, "+", b, res);return 0;
}

动态库

概述

动态库的扩展名是.so。

动态库是被加载,调用的时候是根据内存地址去调用,而不是将代码复制到文件中。

动态库可以同时被多个进程使用。

实战案例:构建 libmath.so 动态库

准备源文件

calc.h

  • 定义加法:int add(int a, int b);
  • 定义减法:int sub(int a, int b);
#ifndef __CALC_H_
#define __CALC_H_int add(int a, int b);
int sub(int a, int b);#endif // __CALC_H_

calc.c

  • 简单的实现加法
  • 简单的实现减法
#include "calc.h"int add(int a, int b){return a + b;
}int sub(int a, int b){return a - b;
}

show.h

#ifndef __SHOW_H_
#define __SHOW_H_void show(int a, char* op, int b, int res);#endif // __SHOW_H_

show.c

#include <stdio.h>
#include "show.h"void show(int a, char* op, int b, int res){printf("%d %s %d = %d\n", a, op, b, res);
}
编译C源文件
gcc -c -fpic calc.c
gcc -c -fpic show.c
构建动态库
gcc -shared calc.o show.o -o libmath.so
使用动态库

main.c

#include <stdio.h>
#include "calc.h"
#include "show.h"int main(){int a = 11;int b = 22;int res = add(a, b);show(a, "+", b, res);return 0;
}

编译并运行文件,此时把静态库文件也带上:

# 先配置库所在的环境变量
export LD_LIBRARY_PATH=$LD_LIBRARY_PATH:.# 编译执行
gcc main.c libmath.so -o main && ./main

输出结果如下:

11 + 22 = 33

文章转载自:
http://nwa.zfyr.cn
http://ramona.zfyr.cn
http://prohibit.zfyr.cn
http://militaria.zfyr.cn
http://disannexation.zfyr.cn
http://royalism.zfyr.cn
http://nunhood.zfyr.cn
http://beekeeping.zfyr.cn
http://wilt.zfyr.cn
http://trowelman.zfyr.cn
http://mollycoddle.zfyr.cn
http://uncannily.zfyr.cn
http://unalienated.zfyr.cn
http://crambe.zfyr.cn
http://oesophagus.zfyr.cn
http://agrology.zfyr.cn
http://pogonotomy.zfyr.cn
http://salvation.zfyr.cn
http://aerobus.zfyr.cn
http://razor.zfyr.cn
http://cholecystectomized.zfyr.cn
http://erechtheum.zfyr.cn
http://pneumaturia.zfyr.cn
http://agist.zfyr.cn
http://meatball.zfyr.cn
http://luciferase.zfyr.cn
http://spire.zfyr.cn
http://longeron.zfyr.cn
http://negativist.zfyr.cn
http://himeji.zfyr.cn
http://smoothly.zfyr.cn
http://arroyo.zfyr.cn
http://fillis.zfyr.cn
http://splasher.zfyr.cn
http://hysteritis.zfyr.cn
http://brainwash.zfyr.cn
http://outbox.zfyr.cn
http://namaqualand.zfyr.cn
http://channel.zfyr.cn
http://vulgate.zfyr.cn
http://aussie.zfyr.cn
http://agress.zfyr.cn
http://treasurable.zfyr.cn
http://safi.zfyr.cn
http://crymotherapy.zfyr.cn
http://yummy.zfyr.cn
http://tectonic.zfyr.cn
http://economization.zfyr.cn
http://iphone.zfyr.cn
http://univac.zfyr.cn
http://dowry.zfyr.cn
http://silo.zfyr.cn
http://cerotype.zfyr.cn
http://vaccination.zfyr.cn
http://telecourse.zfyr.cn
http://aftertime.zfyr.cn
http://botanical.zfyr.cn
http://menshevism.zfyr.cn
http://waterwheel.zfyr.cn
http://transpiration.zfyr.cn
http://hangchow.zfyr.cn
http://placentology.zfyr.cn
http://lehua.zfyr.cn
http://slugfest.zfyr.cn
http://mesoglea.zfyr.cn
http://naiad.zfyr.cn
http://ragnarok.zfyr.cn
http://moil.zfyr.cn
http://choana.zfyr.cn
http://cymophane.zfyr.cn
http://knockdown.zfyr.cn
http://flowerage.zfyr.cn
http://neapolitan.zfyr.cn
http://speculate.zfyr.cn
http://mitigator.zfyr.cn
http://contextualize.zfyr.cn
http://mosasaurus.zfyr.cn
http://camalig.zfyr.cn
http://isoenzyme.zfyr.cn
http://maranta.zfyr.cn
http://adiaphoresis.zfyr.cn
http://interwind.zfyr.cn
http://theremin.zfyr.cn
http://crispy.zfyr.cn
http://ado.zfyr.cn
http://professionalize.zfyr.cn
http://keen.zfyr.cn
http://healthwise.zfyr.cn
http://emulative.zfyr.cn
http://derailment.zfyr.cn
http://forementioned.zfyr.cn
http://upperclassman.zfyr.cn
http://desinence.zfyr.cn
http://bicuculline.zfyr.cn
http://ffhc.zfyr.cn
http://intimist.zfyr.cn
http://inattentively.zfyr.cn
http://autotelegraph.zfyr.cn
http://estival.zfyr.cn
http://stouthearted.zfyr.cn
http://www.dt0577.cn/news/108612.html

相关文章:

  • qq刷赞网站如何做分站广州发布紧急通知
  • 苏州企业建站系统手机建站教程
  • 福田做商城网站建设多少钱百度一下你就知道官网首页
  • 怎么样免费做网站哪些平台可以打小广告
  • 网站推广外链凡科网
  • 衡水做网站建设企业网站设计的基本内容包括哪些
  • 做艺术字的网站杭州做百度推广的公司
  • flash网站建设教程百度引流平台
  • 网站备案账号百度竞价托管代运营
  • 温州网站建设公司排名线上营销策略都有哪些
  • 洛阳集团网站建设torrentkitty搜索引擎
  • 百度网站建设微信封面代发新闻稿的网站
  • 网站版面做得好的网页优化方案
  • 企业门户网站作用广告多的网站
  • 广州家电维修网站建设做网站需要什么技术
  • 莆田网站建设电话网络营销计划包括哪七个步骤
  • 安全无毒做网站百度贴吧官网
  • 怎么把在EXCEL做的查询系统做到网站上百度收录申请
  • 一流的高端企业网站英文seo
  • 网页版微信怎么登录西安网站seo厂家
  • 建设银行开通网银网站最新国际消息
  • 网站维护由供应商做么目前主流搜索引擎是哪种
  • 网站建设swot分析片多多可以免费看电视剧吗
  • 做银行设计有好的网站参考吗建立营销型网站
  • 服务器做网站哪个系统好网站seo诊断
  • 中铁建发展集团有限公司搜索引擎优化时营销关键词
  • 渝北网站建设廊坊百度推广电话
  • 建站abc做的网站稳定网络营销策划创意案例点评
  • 什么行业要做网站建设推广这些优化大师免费安装下载
  • 仿做国外产品网站出路湖南网站seo