Chinaunix首页 | 论坛 | 博客
  • 博客访问: 956408
  • 博文数量: 120
  • 博客积分: 6454
  • 博客等级: 准将
  • 技术积分: 1739
  • 用 户 组: 普通用户
  • 注册时间: 2007-06-28 17:45
文章分类

全部博文(120)

文章存档

2014年(1)

2013年(1)

2012年(11)

2011年(16)

2010年(6)

2009年(11)

2008年(30)

2007年(44)

分类: C/C++

2008-04-27 18:40:12

     在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")

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