openssl编程出现no OPENSSL_Applink

错误现象:

直接运行打印以下错误:

OPENSSL_Uplink(10111000,08): no OPENSSL_Applink


调试,问题出在:PEM_write_RSAPublicKey 这个函数上,调试信息如下:

'PSCS7+SIGN.exe' (Win32): Loaded 'F:\code\PSCS7+SIGN\Debug\PSCS7+SIGN.exe'. Symbols loaded.
'PSCS7+SIGN.exe' (Win32): Loaded 'C:\Windows\System32\ntdll.dll'. Cannot find or open the PDB file.
'PSCS7+SIGN.exe' (Win32): Loaded 'C:\Windows\System32\kernel32.dll'. Cannot find or open the PDB file.
'PSCS7+SIGN.exe' (Win32): Loaded 'C:\Windows\System32\KernelBase.dll'. Cannot find or open the PDB file.
'PSCS7+SIGN.exe' (Win32): Loaded 'C:\Windows\System32\libeay32.dll'. Cannot find or open the PDB file.
'PSCS7+SIGN.exe' (Win32): Loaded 'C:\Windows\System32\ws2_32.dll'. Cannot find or open the PDB file.
'PSCS7+SIGN.exe' (Win32): Loaded 'C:\Windows\System32\msvcrt.dll'. Cannot find or open the PDB file.
'PSCS7+SIGN.exe' (Win32): Loaded 'C:\Windows\System32\rpcrt4.dll'. Cannot find or open the PDB file.
'PSCS7+SIGN.exe' (Win32): Loaded 'C:\Windows\System32\nsi.dll'. Cannot find or open the PDB file.
'PSCS7+SIGN.exe' (Win32): Loaded 'C:\Windows\System32\gdi32.dll'. Cannot find or open the PDB file.
'PSCS7+SIGN.exe' (Win32): Loaded 'C:\Windows\System32\user32.dll'. Cannot find or open the PDB file.
'PSCS7+SIGN.exe' (Win32): Loaded 'C:\Windows\System32\lpk.dll'. Cannot find or open the PDB file.
'PSCS7+SIGN.exe' (Win32): Loaded 'C:\Windows\System32\usp10.dll'. Cannot find or open the PDB file.
'PSCS7+SIGN.exe' (Win32): Loaded 'C:\Windows\System32\advapi32.dll'. Cannot find or open the PDB file.
'PSCS7+SIGN.exe' (Win32): Loaded 'C:\Windows\System32\sechost.dll'. Cannot find or open the PDB file.
'PSCS7+SIGN.exe' (Win32): Loaded 'C:\Windows\winsxs\x86_microsoft.vc90.crt_1fc8b3b9a1e18e3b_9.0.30729.4940_none_50916076bcb9a742\msvcr90.dll'. Cannot find or open the PDB file.
'PSCS7+SIGN.exe' (Win32): Loaded 'C:\Windows\System32\msvcr110d.dll'. Symbols loaded.
'PSCS7+SIGN.exe' (Win32): Loaded 'C:\Windows\System32\imm32.dll'. Cannot find or open the PDB file.
'PSCS7+SIGN.exe' (Win32): Loaded 'C:\Windows\System32\msctf.dll'. Cannot find or open the PDB file.
'PSCS7+SIGN.exe' (Win32): Loaded 'C:\Windows\System32\netapi32.dll'. Cannot find or open the PDB file.
'PSCS7+SIGN.exe' (Win32): Loaded 'C:\Windows\System32\netutils.dll'. Cannot find or open the PDB file.
'PSCS7+SIGN.exe' (Win32): Loaded 'C:\Windows\System32\srvcli.dll'. Cannot find or open the PDB file.
'PSCS7+SIGN.exe' (Win32): Loaded 'C:\Windows\System32\wkscli.dll'. Cannot find or open the PDB file.
'PSCS7+SIGN.exe' (Win32): Unloaded 'C:\Windows\System32\netapi32.dll'
'PSCS7+SIGN.exe' (Win32): Unloaded 'C:\Windows\System32\wkscli.dll'
'PSCS7+SIGN.exe' (Win32): Unloaded 'C:\Windows\System32\srvcli.dll'
'PSCS7+SIGN.exe' (Win32): Unloaded 'C:\Windows\System32\netutils.dll'
'PSCS7+SIGN.exe' (Win32): Loaded 'C:\Windows\System32\cryptsp.dll'. Cannot find or open the PDB file.
'PSCS7+SIGN.exe' (Win32): Loaded 'C:\Windows\System32\rsaenh.dll'. Cannot find or open the PDB file.
'PSCS7+SIGN.exe' (Win32): Loaded 'C:\Windows\System32\cryptbase.dll'. Cannot find or open the PDB file.
The thread 0x1d3c has exited with code 1 (0x1).
The thread 0x1d64 has exited with code 1 (0x1).
The program '[7480] PSCS7+SIGN.exe' has exited with code 1 (0x1).



解决方法:


在main文件中加入OpenSSL的链接头文件

extern "C"{
#include "openssl/applink.c"
};


  • 0
    点赞
  • 0
    收藏
    觉得还不错? 一键收藏
  • 1
    评论

“相关推荐”对你有帮助么?

  • 非常没帮助
  • 没帮助
  • 一般
  • 有帮助
  • 非常有帮助
提交
评论 1
添加红包

请填写红包祝福语或标题

红包个数最小为10个

红包金额最低5元

当前余额3.43前往充值 >
需支付:10.00
成就一亿技术人!
领取后你会自动成为博主和红包主的粉丝 规则
hope_wisdom
发出的红包
实付
使用余额支付
点击重新获取
扫码支付
钱包余额 0

抵扣说明:

1.余额是钱包充值的虚拟货币,按照1:1的比例进行支付金额的抵扣。
2.余额无法直接购买下载,可以购买VIP、付费专栏及课程。

余额充值