c - Linux 上的存档文件在哪里?

标签 c linux archive

我正在通过一本书学习 C。书中提到存档文件:

An archive contains .o files Ever used a .zip or a .tar file? Then you know how easy it is to create a file that contains other files. That’s exactly what a .a archive file is: a file containing other files. Open up a terminal or a command prompt and change into one of the library directories. These are the directories like /usr/lib or C:\MinGW\lib that contain the library code. In a library directory, you’ll find a whole bunch of .a archives. And there’s a command called nm that you can use to look inside them.

然而,当我查找那本书说的 lib 位置(在 Ubuntu 上)时,没有找到存档文件。 我怎样才能看到这些存档文件?

最佳答案

系统库的位置在不同的发行版中可能会略有不同。在 Ubuntu 上,您可以在 /usr/lib/x86_64-linux-gnu/usr/lib32 中分别找到 64 位和 32 位的静态库(这实际上,在较旧的 Ubuntu 发行版中略有不同。但在最近的发行版(>Ubuntu 12)中,这一直是一致的)。

关于c - Linux 上的存档文件在哪里?,我们在Stack Overflow上找到一个类似的问题: https://stackoverflow.com/questions/41315500/

相关文章:

linux - Tar Issue 后脚本中的二进制文件

python - Barebones SWIG python C 接口(interface)在 OSX+clang 上出现段错误,而不是在 Linux+gcc 中

c - 如何编写一个可以读取数据并将一些数据复制到变量中的C程序?

c - sys/time.h 定时器只运行一次

c - Serial.print 只打印一次 Arduino

c - 显示随机生成的整数的频率

php - Ubuntu linux apache2 cronjob 不调用 php 文件

php - 如何为我的自定义博客文章创建文件?

D:如何从存档中提取数据?

linux - 为什么不能使用 gzip、bzip、bzip2、xz 压缩目录?