Creating c++ static library that uses 3rd party static libraries.
-
(C++ and Visual Studio 2019) We have a 3rd party library that we want to use (we build from source and it generates many, many static libs). I want to create an abstraction layer on top of this 3rd party library, as a static library. And I want my client application to use my own abstraction layer so it does not have to directly include the 3rd party headers. Can I "link" the 3rd party libraries (libs) in my own library so that I can just link we one library in my client application ? Or I will need to link my application with the 3rd party libraries as well as my own library ?
I'd rather be phishing!
-
(C++ and Visual Studio 2019) We have a 3rd party library that we want to use (we build from source and it generates many, many static libs). I want to create an abstraction layer on top of this 3rd party library, as a static library. And I want my client application to use my own abstraction layer so it does not have to directly include the 3rd party headers. Can I "link" the 3rd party libraries (libs) in my own library so that I can just link we one library in my client application ? Or I will need to link my application with the 3rd party libraries as well as my own library ?
I'd rather be phishing!
-
(C++ and Visual Studio 2019) We have a 3rd party library that we want to use (we build from source and it generates many, many static libs). I want to create an abstraction layer on top of this 3rd party library, as a static library. And I want my client application to use my own abstraction layer so it does not have to directly include the 3rd party headers. Can I "link" the 3rd party libraries (libs) in my own library so that I can just link we one library in my client application ? Or I will need to link my application with the 3rd party libraries as well as my own library ?
I'd rather be phishing!
You can create a "composite" that includes your modules and all modules from 3rd party libraries. About including the 3rd party header files, it depends how good of a job you do at hiding the internals from your users. Thing to keep in mind: remove any #pragma directives that reference the previous libraries. Place only one referring to your "composite" lib in one of your main include files.
Mircea
-
If you create a static library that links to other statics then the result should be a single static library. A simple test should confirm it for you.
Crikey I did not even look at that (bad case of mondaying) It seems to be working. Thanks Richard.
I'd rather be phishing!
-
Crikey I did not even look at that (bad case of mondaying) It seems to be working. Thanks Richard.
I'd rather be phishing!