search

Home  >  Q&A  >  body text

c++ - windows平台的静态库到底是不是.lib

今天想在windows c++程序中集成zeromq,抄了一段示例代码后发现程序运行需要dll。一开始我编译时引入了.lib以为就是静态编译了。结果发现运行还是需要dll,查了半天说这个.lib是.dll的一部分。本来我还想程序发布时不需要zeromq的dll的。请教zeromq能编译成静态库与我的程序结合吗?

巴扎黑巴扎黑2767 days ago828

reply all(2)I'll reply

  • PHP中文网

    PHP中文网2017-04-17 15:07:41

    After being referenced, it will be embedded into the dll

    reply
    0
  • PHP中文网

    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.

    reply
    0
  • Cancelreply