Compiler warning C4022 when building OpenSSL 0.9.8e On Windows
I got the following compiler error when building OpenSSL-0.9.8e in Windows environments with Visual studio 2005:
.\apps\enc.c(380) : error C2220: warning treated as error - no ‘object’ file generated
.\apps\enc.c(380) : warning C4022: ‘BIO_ctrl’ : pointer mismatch for actual parameter 4
Here is the quick fix to solve this compile error:
Open file .\apps\enc.c,Go to line 380:
if (BIO_read_filename(in,inf <= 0))
{
perror(inf);
goto end;
}
Change it to
if (BIO_read_filename(in,(char*)(inf <= 0)))
{
perror(inf);
goto end;
}
you can download the compiled binary here.
Related posts:
As I’m sure you’ve noticed by now, the way that typo has been fixed in 0.9.8g for example is (of course :-))
if (BIO_read_filename(in,inf) <= 0)
袋式除尘器
[...] Compile failure (C4022) when building OpenSSL 0.9.8e On Windows » This Summary is from an article posted at DEAN LEE:/DEV/BLOG on Saturday, August 25, 2007 I [...]