- html - 出于某种原因,IE8 对我的 Sass 文件中继承的 html5 CSS 不友好?
- JMeter 在响应断言中使用 span 标签的问题
- html - 在 :hover and :active? 上具有不同效果的 CSS 动画
- html - 相对于居中的 html 内容固定的 CSS 重复背景?
我在这方面需要澄清。我觉得Static library
和Dynamic Library
这两个术语不正确。
On most unix-style platforms the extensions are
- .a for static libraries (archives) and
- .so for shared libraries.
On Windows:
- .dll indicates a shared library
- .lib indicates a static or import library.
Static library
和Dynamic Library
在内部有何不同。This chapter describes the object file format, called ELF (Executable and Linking Format). There are three main types of object files.
A relocatable file holds code and data suitable for linking with other object files to create an executable or a shared object file.
An executable file holds a program suitable for execution; the file specifies how exec(BA_OS) creates a program's process image.
A shared object file holds code and data suitable for linking in two contexts. First, the link editor [see ld(BA_OS)] processes the shared object file with other relocatable and shared object files to create another object file. Second, the dynamic linker combines it with an executable file and other shared objects to create a process image.
最佳答案
.o
文件不是类型的库文件中的。它们是一个对象文件。.a
/.lib
文件在构建时链接。事后便无法更换它们。这使它们成为静态的。.so
/.dll
文件在运行时链接。在执行开始之前的任何时候都可以更换它们。这使它们充满活力。
重定位表示二进制文件在内存中的放置;静态库中的代码已与二进制文件集成在一起,因此不能独立地重定位。
关于linker - 静态库和动态库: Confusion,我们在Stack Overflow上找到一个类似的问题: https://stackoverflow.com/questions/2246799/
我的makefile的一部分看起来像这样...... ifdef vis flg += -framework GLUT -framework OpenGL -Dvis obj += camfun.o
我正在尝试将 MPI 与 D 编程语言结合使用。 D 完全支持 C ABI,可以链接和调用任何 C 代码。我已经完成了显而易见的工作并将 MPI header 翻译为 D。然后我翻译了 a test
我研究了 makefile 项目。我正在使用 gnu gcc 并作为链接器,我使用带有以下参数的 gcc: linkerCmdLine=$(exe) -Wl,--start-group -nostdl
我尝试使用 FMDB 数据库,但出现错误: Undefined symbols for architecture i386: "_OBJC_CLASS_$_FMDatabase", referen
我想知道“本地链接器符号”和“本地程序变量”之间的区别? 我正在读一本书,里面有这样的: alt text http://img682.imageshack.us/img682/9816/symbol
假设我正在使用 clang 构建和链接我的应用程序 clang -I/usr/local/include -c -o app.o main.c clang -L/usr/local/lib -o ap
我正在从程序员的角度阅读计算机系统,关于链接的章节。它解释了如何使用程序 ld 在 linux x86-64 中进行链接。作者声称,为了从可重定位的目标文件构建可执行文件,链接器做了两件事:符号解析和
所以,这是我发现自己想到的任务。假装一下,我有大量的内容。我想查看哪些网站链接到我的内容。我知道我可以研究 TrackBack 或 PingBack,但是那些不使用能够处理这些问题的工具的人呢? 似乎
我认为 动态加载意味着在加载或运行时将库(或任何其他二进制文件)加载到内存中。所以在下面的程序中,当 dlopen() 调用动态加载器时,它会出现,如果库尚未加载,它会将库加载到内存中。 动态链接是指
我想澄清我对共享库的困惑。当我在网上搜索时,我在对静态链接的解释中发现,由于库包含在可执行文件本身中,因此它会导致更大的可执行文件,从而增加程序的内存占用。 而在动态库/共享库的情况下,库是在运行时链
我正在开发一个嵌入式系统(Stellaris Launchpad)并编写一个简单的操作系统(作为一个爱好项目)。使用的工具链是 gcc-none-eabi。 我的下一步是习惯 MPU 以允许内核阻止用
我正在与 JNI 合作。我有一个包装库 (wrapper.so),它使用两个共享库:one.so 和 two.so 一切正常。所有 *.so 都在 lib 文件夹中,在程序文件夹内。 问题是,如果我将
使用通过“node-gyp”传递的链接器命令行选项,我指定了我希望程序链接的库路径和库名称。但是生成的可执行文件没有引用我指定的文件,它在 /usr/lib 中引用了一个不同的名称。 . 我正在使用
我正在为 AWS lambda 开发 native 节点模块。此节点模块需要 json-c 根据 AWS lambda guidelines节点模块不应具有动态依赖关系。所以尝试链接json-c库的静
我想配置一个自动工具化的项目来调用一个非标准的 链接器( gold linker ), 使用 Linux Mint 16/Ubuntu 13.10 的库存自动工具 我相信我会通过以下方式实现这一目标:
要将可执行文件与位于标准位置的库链接,可以在 CmakeLists.txt 文件中执行以下操作: create_executable(generate_mesh generate_mesh.cpp)
链接描述脚本是否可以访问makefile/shell变量并根据所述变量做出决定? 例如,假设我想在不使用其他链接程序脚本的情况下更改下面RAM区域的开始,是否可以使用make变量来执行此操作? MEM
第三方为我提供了一个静态lib(.a)以便与solaris站链接。 我尝试使用sunpro进行编译,但在链接步骤失败。 我想问题出在我使用的编译器(而不是gcc?)或它的版本(由于编译器提供的std
当我们编译代码时,将生成一个目标文件。在链接过程中,从该目标文件生成一个可执行文件。 为什么我们需要一个目标文件?目标文件有什么用?不可能直接生成可执行文件吗?毕竟,我们使用可执行文件来运行该程序。
我知道头文件包含函数和变量的声明,它们在编译期间帮助判断输入的参数是否有效。 所有的库函数都是默认链接的吗? //#include //#include int main() { printf
我是一名优秀的程序员,十分优秀!