I developed a C++ modular program which loads its modules dynamically. Each module needs a specific static library and I linked this static library to each module. Is there any way to share this static library among all modules without linking it to them separately?
Asked
Active
Viewed 50 times
1 Answers
1
Yes, it is possible. Instead of static library, create dynamic library (so
on *nix or dll
on Windows) and link your modules against this dynamic lib.
-
if i link my modules against this dynamic lib, whether this lib load to memory one time or multiple times? – peter Mar 15 '15 at 17:00
-
@peter It will be loaded into memory just one time. – ScottMcP-MVP Mar 15 '15 at 17:08