我正在尝试测试 openssl 附带的加密库,我从 http://www.openssl 下载了 openssl。 org/source/ ,它包含一个 /crypto 文件夹,其中包含每种加密类型的子文件夹。
我想尝试 BIO_f_base64,所以我创建了一个空的控制台应用程序,并添加了所需的包含内容,还将 /bio 和 /evp 文件夹的路径添加到了 c++ incl 目录,还添加了主 /openssl 文件夹。
当我尝试编译时,我得到 Cannot open include file: 'openssl/e_os2.h': No such file or directory
但文件在那里,我应该以不同的方式使用加密库吗?如何使用它仅添加 /openssl 路径而不添加我使用的所有加密子文件夹?
另外,我没有任何 .lib 文件,在哪里可以获得它们?
I am trying to test the crypto library that comes with openssl, I downloaded openssl from http://www.openssl.org/source/ and it contains a /crypto folder with subfolders for each encryption type.
I wanted to try BIO_f_base64 so I created an empty console app, and added the includes needed, also added the paths to the /bio and /evp folders to c++ incl directories, and also added the main /openssl folder.
When I try to compile I get Cannot open include file: 'openssl/e_os2.h': No such file or directory
But the file is there, should I use the crypto lib in a different way? How can I use it adding only the /openssl path and not all the crypto subfolders I use?
Also I don't have any .lib files, where can I get them?
发布评论
评论(2)
您需要为 Windows 构建的 OpenSSL 版本,而不是源版本。我建议从此处安装一个版本,其中有一些不错的 .lib 文件和标头安装程序。安装完成后,您必须使用正确的包含路径来更新 VS 项目,以便从安装程序放置标头的位置获取标头。
You need a version of the OpenSSL that is built for Windows, not the source release. I recommend installing a version from here, which has some nice installers for .lib files and headers. Once you have it installed you will have to update your VS project with the proper include paths to pick up the headers from where ever the installer put them.
在 Windows 中,如果您想自己编译它,可以运行以下命令:
对于 64 位:
对于 32 位:
编译源代码后,标头位于
inc32
文件夹和out32dll
文件夹中的 >libs/dlls。您可以在安装文件中找到更多详细信息。
In windows, if you want to compile it yourself, you can do so running:
For 64 bit:
For 32 bit:
Once you compile the sources, the headers are located in the
inc32
folder and thelibs/dlls
in theout32dll
folder.You can find much more detailed information in the INSTALL files.