起因:
公司项目 服务器的nginx是使用的定制版,使用了concat、缩略图生成等模块,为了方便同事们在办公室环境下使用nginx,在Windows下编译nginx,并带上这两个模块。
之前在 VC2013 之前的版本一直编译很顺利,最近开发环境改用了 VC2015 突然发现编译不过了。报了一堆link error!
libeay32.lib(ui_openssl.obj) : error LNK2001: 无法解析的外部符号 ___iob_func libeay32.lib(cryptlib.obj) : error LNK2001: 无法解析的外部符号 ___iob_func libeay32.lib(pem_lib.obj) : error LNK2001: 无法解析的外部符号 ___iob_func libeay32.lib(rsa_sign.obj) : error LNK2001: 无法解析的外部符号 ___iob_func libeay32.lib(txt_db.obj) : error LNK2001: 无法解析的外部符号 ___iob_func ssleay32.lib(t1_enc.obj) : error LNK2001: 无法解析的外部符号 ___iob_func ssleay32.lib(s3_srvr.obj) : error LNK2001: 无法解析的外部符号 ___iob_func ssleay32.lib(d1_both.obj) : error LNK2001: 无法解析的外部符号 ___iob_func ssleay32.lib(d1_enc.obj) : error LNK2001: 无法解析的外部符号 ___iob_func
VC2015的头文件中搜索到如下内容(corecrt_wstdio.h)
_ACRTIMP_ALT FILE* __cdecl __acrt_iob_func(unsigned); #define stdin (__acrt_iob_func(0)) #define stdout (__acrt_iob_func(1)) #define stderr (__acrt_iob_func(2))
_CRTIMP FILE * __cdecl __iob_func(void); #define stdin (&__iob_func()[0]) #define stdout (&__iob_func()[1]) #define stderr (&__iob_func()[2])
版权声明:本文为博主原创文章,未经博主允许不得转载。
原文:http://blog.csdn.net/bywayboy/article/details/48947035