打开
C:\msys64\mingw64.exe
./config no-asm -fPIC no-shared -static-libstdc++ -static-libgcc -march=x86-64
提示:
“glob” is not exported by the File::Glob module Can’t continue after import errors at ./Configure
解决方法:
glob相关问题
This issue is due to the Perl package File::Glob, 一些简单的修改就能修复这个. 在 Configure文件和 test/build.info这个文件,
把
use if $^O ne "VMS", 'File::Glob' => qw/glob/;
1
改成
use if $^O ne "VMS", 'File::Glob' => qw/:glob/;
1
就解决了
make clean
make
链接库:
#include <windows.h>
#pragma comment(lib, "legacy_stdio_definitions.lib")
__mingw_vsscanf未定义等:
修改C:\msys64\mingw64\include\stdio.h重新编译openssl
static FILE* __cdecl __iob_func(unsigned i)
{
return __acrt_iob_func(i);
}
// static FILE* __cdecl __acrt_iob_func(unsigned i)
// {
// return &__iob_func()[i];
// }
static int __cdecl __mingw_vfprintf(
FILE *stream,
const char *format,
va_list argptr
)
{
return vfprintf_s(stream, format, argptr);
}
static int __cdecl __mingw_vsscanf (
const char * _Str,
const char * Format,
va_list argp
)
{
return vsscanf_s(_Str, Format, argp);
}
static int __cdecl __mingw_vsprintf (
char * _Str,
const char * Format,
va_list argp
)
{
return vsprintf(_Str, Format, argp);
}