简体   繁体   中英

Create a single library file from several

I need to build some library (let's call it library A ) in my project. That library depends on several other libraries. When I build it I have a .dll and .lib files. Now when I try to use it, I need to include A 's headers, add newly created .lib and .dll to project. Moreover I need to add other .libs and .dlls. One of that libraries is Boost.

Is it possible to have as few files as possible? I don't want other team members to download Boost and build it in order to compile my code. I just want to add one single library and header from A .

You should try to use as much as you can static libraries then - they will only include the code you need and won't create DLL dependencies from your DLL. This is not a good idea however because in this way your users won't be able to benefit from future libraries updates - as replacing dependant DLL's.

About the .lib files - your users will only need 1 of them which will expose your DLL functionality. The libs you used to create it are not needed.

The technical post webpages of this site follow the CC BY-SA 4.0 protocol. If you need to reprint, please indicate the site URL or the original address.Any question please contact:yoyou2525@163.com.

 
粤ICP备18138465号  © 2020-2024 STACKOOM.COM