如何在ubuntu中为C代码创建库文件 [英] How to create a library file for a C code in ubuntu

查看:182
本文介绍了如何在ubuntu中为C代码创建库文件的处理方法,对大家解决问题具有一定的参考价值,需要的朋友们下面随着小编来一起学习吧!

问题描述





如何为我编写的C代码创建库文件。静态库和共享对象库之间有什么区别。

解决方案

这是创建两种类型的非常好的方法:使用gnu编译器创建共享和静态库 [ ^ ]。

只是 Google搜索你可能会发现许多页面解释了静态库和动态库之间的差异。这是一个例子:静态和动态之间有什么区别(共享)库链接? [ ^ ]。


查看本教程:静态,共享动态和可加载的Linux库 [ ^ ]。

Hi,

How to create a library file for a C code that i have written. And what is the difference between static library and shared objects libraries.

解决方案

This is a very nice recipe for creating both kinds of them: "Creating a shared and static library with the gnu compiler"[^].
Just Googling you may find many pages explaining the differences between static and dynamic libraries. Here's one example: "What are the differences between static and dynamic (shared) library linking?"[^].


See this tutorial: Static, Shared Dynamic and Loadable Linux Libraries[^].


这篇关于如何在ubuntu中为C代码创建库文件的文章就介绍到这了,希望我们推荐的答案对大家有所帮助,也希望大家多多支持IT屋!

查看全文
登录 关闭
扫码关注1秒登录
发送“验证码”获取 | 15天全站免登陆