Chinaunix首页 | 论坛 | 博客
  • 博客访问: 620205
  • 博文数量: 363
  • 博客积分: 110
  • 博客等级: 民兵
  • 技术积分: 1347
  • 用 户 组: 普通用户
  • 注册时间: 2011-06-22 16:07
文章分类

全部博文(363)

文章存档

2018年(83)

2016年(1)

2014年(2)

2013年(34)

2012年(236)

2011年(7)

分类: C/C++

2013-10-13 14:48:56

     在VC6上如何使用已经编译好的OpenSSL呢。
     1. 首先就是要拿到两个动态链接库文件。
OpenSSL编译完成后,在*\openssl\out32dll文件夹下会得到两个dll文件:ssleay32.dll和llibeay32.dll,这两个文件就是在release产品时需要“随身携带”的。
     2. 然后设置一下VC6的环境:
     菜单栏中依次进入:Tools-->Options
     找到Directories页签,在"Show directories for"中的:
     Include files栏中加入"F:\openssl-0.9.8g\inc32"
     Library files栏中加入"F:\openssl-0.9.8g\out32dll"
     3. 在程序中加入头文件并且引入lib文件:

#include "openssl/ssl.h"
#include "openssl/err.h"
#include "openssl/bio.h"
#include "openssl/rand.h"
#pragma comment(lib, "ssleay32.lib")
#pragma comment(lib, "libeay32.lib")

阅读(1180) | 评论(0) | 转发(0) |
给主人留下些什么吧!~~