简体   繁体   English

我们可以在 2 个不同的库文件中使用相同的 function,如果两个库都在同一个 DLL 文件中使用

[英]Can we use same function in 2 different library file , if both the library consumed in same DLL file

  1. Can we use the same function in 2 different library files, if they included in a common DLL file.我们可以在 2 个不同的库文件中使用相同的 function,如果它们包含在一个通用的 DLL 文件中。
  2. Can I define the function in 1 lib file & use that function from another lib file.我可以在 1 个 lib 文件中定义 function 并使用另一个 lib 文件中的 function 吗? in this case, if one common DLL only used a library file that does not have a function definition, will that be a problem?在这种情况下,如果一个常见的 DLL 只使用了一个没有 function 定义的库文件,那会不会有问题? or is fine if the DLL included both the lib file?或者如果 DLL 包含两个 lib 文件就可以了?
  1. A function may be used in two or more different source files, as long as the object files that result from compiling them are linked with an object file that defines the function, whether in a DLL or otherwise. function 可以用于两个或多个不同的源文件,只要编译它们产生的 object 文件与定义 function 的 object 文件链接,无论是在 DLL 中还是其他地方。

  2. A function can be defined in one source file and used in another source file that are both compiled into object files and linked into the same DLL.一个 function 可以在一个源文件中定义并在另一个源文件中使用,这两个源文件都编译成 object 文件并链接到相同的 DLL。

暂无
暂无

声明:本站的技术帖子网页,遵循CC BY-SA 4.0协议,如果您需要转载,请注明本站网址或者原文地址。任何问题请咨询:yoyou2525@163.com.

相关问题 我们可以通过给静态在C中的2个不同文件中使用相同的函数名吗? - Can we use same function name in 2 different file in C by giving static? 导入库可以同时包含存根和静态代码吗? - Can an import library contain both stubs and static code at the same time? C - 管理同一文件的共享库 - C - Shared library with management of the same file extern声明和函数定义都在同一个文件中 - extern declaration and function definition both in the same file 如何取消定义库函数以使用我们的相同函数版本 - How to undef a library function to use our version of same function 需要重建以将其与提供相同接口的不同库一起使用吗? - Need rebuild to use it with different library that provides the same interface? 在 C 和 Python 中映射相同的文件,它真的会使用共享内存吗? mmap 可以跨不同的编程语言工作吗? - mmap a same file in both C and Python, will it really use the shared memory? will mmap work across different programming languages? 信号量可用于访问同一库的两个不同应用程序 - can semaphores be used for two different applications accessing the same library 对通过静态库调用的同一.c文件中定义的函数的未定义引用 - Undefined reference to Function defined in same .c file invoked through static library 识别文件(dll / exe)是否被进程或库锁定 - Identify if a file(dll/exe) is locked or not by a process or library
 
粤ICP备18138465号  © 2020-2024 STACKOOM.COM