- Can we use the same function in 2 different library files, if they included in a common DLL file.
- Can I define the function in 1 lib file & use that function from another lib file. in this case, if one common DLL only used a library file that does not have a function definition, will that be a problem ? or is fine if the DLL included both the lib file?
Can we use same function in 2 different library file , if both the library consumed in same DLL file
Asked
Active
Viewed 64 times
-1

simplePerson43
- 3,787
- 1
- 15
- 10
-
You should rewrite this to be clearer. What do you mean by “lib file”? What do you mean by “consumed”? Try to show specific examples. – Eric Postpischil Sep 23 '20 at 08:45
-
@EricPostpischil Modified . – simplePerson43 Sep 23 '20 at 09:25
-
Is a “library file” a C source file that is compiled and used to make a DLL? – Eric Postpischil Sep 23 '20 at 10:29
-
@EricPostpischil Yes C source code – simplePerson43 Sep 23 '20 at 19:50
1 Answers
0
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.
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.

Eric Postpischil
- 195,579
- 13
- 168
- 312