1

I am on a Debian linux build environment and cannot change this. We build our apps using mingw and would like to use the openssl suite of tools in one of our applications. The linux version contains the includes openssl/md5.h and compiles gcc with the -lcrypto flag and works great.

What do I need to do to build the Windows dll using mingw and include openssl? My build command looks like this

x86_64-w64-mingw32-gcc -shared -s FILE.c FILE.def -lcrypto -lws2_32 -o OUT.dll

This produces the error fatal error openssl/md5.h no such file or directory.

I have tried to add the -I /path/to/openssl/includes Then get the ld error cannot find -lcrypto. I have the libssl-dev libraries.

I have the source for openssl and have tried to compile it using mingw as some other articles have suggested. "cannot find -lcrypto -lssl" with OpenSSL on Windows with MinGW But the build always fails with multiple files missing the include bits/libc-header-start.h. My thinking was if I can get the windows dlls on the linux system maybe that was what mingw needed.

I have tried to install gcc-multilib as suggested in this post "fatal error: bits/libc-header-start.h: No such file or directory" while compiling HTK but that leads to a basket of missing dependencies.

Is it even possible to build a Windows dll including openssl dependencies from a Debian dev environment?

Thanks for any assistance.

0 Answers0