Embed all external references when creating a static library
问题 I need to create a wrapper library for C code that wraps my C++ library. Is there a way to create that wrapper library in such a way, that the user needs to link only this wrapper library and doesn't have to include all the (C++) libraries on the linker command line as well? The structure of my test project looks like this: . ├── lib │ ├── cpp │ │ ├── print.cc │ │ └── print.h │ ├── lib.cc │ ├── lib.h └── main.c The main.c is an example C application that uses my library. The lib.h and lib.cc