今天想在windows c++程序中集成zeromq,抄了一段示例代码后发现程序运行需要dll。一开始我编译时引入了.lib以为就是静态编译了。结果发现运行还是需要dll,查了半天说这个.lib是.dll的一部分。本来我还想程序发布时不需要zeromq的dll的。请教zeromq能编译成静态库与我的程序结合吗?
PHP中文网2017-04-17 15:07:41
zeromq can be compiled into a static library with only lib, or into a dll, depending on the compilation options. The dll can be with or without lib. Dlls without lib must be exported by __stdcall and do not need to be linked. They are dynamically loaded using LoadLibrary when the program is running.