Reputation: 11
I've looked around (including StackOverflow), but the only question close to mine, as far as I can tell, is specific to Windows distributables, which doesn't apply to me.
I want to release a library: MyLibrary.lib It uses some third-party libraries, for instance, ZMQ I've included the third-party library into MyLibrary both with either #pragma or actually adding it to the project. Either way, MyLibrary.lib compiles fine and creates a .lib file
HOWEVER. An executable that is linked to MyLibrary complains at link time that it can't find the referenced ZMQ functions, as if ZMQ is not incorporated into MyLibrary.
Looking at MyLibrary with a hex editor it doesn't seem like ZMQ.LIB was incorporated. There are references to it but it seems "weak linked". I don't see the ZMQ code in there.
Alternatively, if I can get the application/executable to build and run it, it'll complain at runtime that it can't find zmq.dll.
Either way, it's obviously not in "MyLibrary".
How can I get a library to include other third-party libraries, so I don't have to distribute a bunch individually? What step am I missing?
Using MSVC2013
Thanks
Upvotes: 0
Views: 47
Reputation: 11
Although I had the .lib I needed, it turns out it was an import lib, and the .dll was distributed elsewhere. I found the .dll and now it works. Thanks to all who responded.
Upvotes: 1
Reputation: 283
What about the flags described in this article: https://msdn.microsoft.com/en-US/library/2kzt1wy3%28v=vs.120%29.aspx Can they help you?
Upvotes: 0