Static library usage dependency explanation

I have a C ++ solution that contains an executable project and a static library. A static library is a reference to an executable project.

A static library needs an external dependency. I would like to create a wrapper for external dependency in a separate solution, so I do not need to cast the dependency in my executable.

It's good that my static library knows about my shell, but not an external dependency. I want to use my shell to provide an interface for my static external dependency library without requiring it to know nothing but the shell.

I wrapped both the DLL and the static library, but I could not link it to my static library, since there is no link in Visual Studio. In addition, the DLL shell did not create a .lib companion.

My question is: What kind of binding should I use on my wrapper to provide an interface for my static library, to use an external dependency, not knowing about an external dependency, just a wrapper? And how do I wrap all the dependency functions in my shell so that my static library does not need any other dlls or libs besides my wrapper?

The main problem I ran into was adding a shell reference from my static library. It seems that I can only do this if they are in the same solution. However, if they are in the same solution, then the solution (and my executable) is polluted with an external dependency. I would rather include only one file (dll / lib), which cherry selects from the external dependency the functionality that I need, instead of including the entire external dependency unnecessarily.

, dll libs (https://msdn.microsoft.com/en-us/library/ms235636.aspx https://msdn.microsoft.com/en-us/library/ms235627.aspx), (https://msdn.microsoft.com/en-us/library/windows/desktop/ms684175%28v=vs.85%29.aspx https://msdn.microsoft.com/en-us/library/7f0aews7.aspx). , dll ( lib), dll ( lib), dll / lib, dll/lib, case, dll/lib .

Windows gcc.

+4

Source: https://habr.com/ru/post/1696138/


All Articles