[openssl-dev] mingw: pkg-config --libs outputs gdi32 before crypto
Ray Satiro
raysatiro at yahoo.com
Wed Oct 21 01:30:43 UTC 2015
OpenSSL 1.0.2d static built with mingw32.
make clean
perl ./Configure mingw
make depend
make
make check
make install
I'm using the pkg-config 0.26 that comes with Strawberry Perl to get the
libs when I want to link to OpenSSL:
pkg-config --static --libs-only-l openssl
-lssl -lws2_32 -lgdi32 -lcrypt32 -lcrypto
I see errors related to the order:
libcrypto.a(rand_win.o):rand_win.c:(.text+0xeab): undefined reference to
`_GetDeviceCaps at 8'
I'd expect gdi32 after crypto. The pc files generated by OpenSSL appear
to do that but that's not the output pkg-config gives me. I'm not sure
if this is an OpenSSL issue or a pkg-config issue. Is anyone else using
pkg-config successfully in this configuration?
Briefly:
openssl.pc
----------
Name: OpenSSL
Description: Secure Sockets Layer and cryptography libraries and tools
Version: 1.0.2d
Requires: libssl libcrypto
libcrypto.pc
------------
Name: OpenSSL-libcrypto
Description: OpenSSL cryptography library
Version: 1.0.2d
Requires:
Libs: -L${libdir} -lcrypto
Libs.private: -lws2_32 -lgdi32 -lcrypt32
Cflags: -I${includedir}
libssl.pc
---------
Name: OpenSSL-libssl
Description: Secure Sockets Layer and cryptography libraries
Version: 1.0.2d
Requires.private: libcrypto
Libs: -L${libdir} -lssl
Libs.private: -lws2_32 -lgdi32 -lcrypt32
Cflags: -I${includedir}
More information about the openssl-dev
mailing list