Reputation: 473
I am creating a static library project in visual studio for personal use, and I'd like to include another existing static library into my own static library.
Usually (for executible projects) I can set up extra include and lib directories in the project's properties, but this time the menues are different and I don't know which settings to use. How would I do that?
Upvotes: 0
Views: 344
Reputation: 473
I figured out a sort of hacky way to make it work.
I just included the library normally as I would in a normal project, and only after that I changed the project type to .lib.
Apparently the additional dependencies get saved after changing the type of the project even though the respective menus in the project configuration pages disappear.
Upvotes: 0
Reputation: 41127
You can include a static library inside a static library, but it generally leads to bloat and other problems.
The best approach is usually to add the link library to your 'public header' using a #pragma
so it's automatically linked:
#pragma comment(lib,"nameoflibIneed.lib")
Upvotes: 1