Find centralized, trusted content and collaborate around the technologies you use most.
Teams
Q&A for work
Connect and share knowledge within a single location that is structured and easy to search.
我正在使用vcpkg下载cpprest包,所以我可以cpprest在我的项目中使用:
vcpkg
cpprest
#include <cpprest/http_client.h> #include <cpprest/filestream.h>
但是在构建我的项目之后,它会生成可执行的二进制文件,还会cpprest.dll在Release 文件夹中生成LIBEAY32.dllSSLEAY32.dllzlib1.dll
cpprest.dll
LIBEAY32.dll
SSLEAY32.dll
zlib1.dll
如何将 dll 编译成一个可执行文件?
在这种情况下,您可以使用静态库,命令行会像这样运行。不需要 DLL 文件,因为可以直接链接 lib 库以生成可执行文件。
.\vcpkg install ccprest:x64-windows-static