Statically linking "libcrypto" (openssl) in windows?

Hi, I downloaded a static pre-compiled version of openssl without dependencies (from an official sponsored link in openssl wiki (, I’d like to statically link libcrypto library to my C program, I’m using MingGW. Can you provide me some guidelines to make it working in eclipse or netbeans ide?

What I tried: I created a directory in my netbeans project path with all include headers and the libcrypto.a , then I configured the library and netbeans added -lcrypto .
Everytime I use any headers like
#include "..path../aes.h *there is this error: "openssl/aes.h:13:11: fatal error: openssl/opensslconf.h: No such file or directory # include <openssl/opensslconf.h>" I tried a lot of settings variations and parameters but I can’t link it.