开发者

What is wrong with my libcrypto linking on Windows?

I am trying to link my c++ program against the libcrypto library, using Cygwin and Windows.

I have this in my .cc file

#include <openssl/dh.h>

I have the header file开发者_StackOverflow社区 dh.h in usr/include/openssl

And I have the required files (libeay32.dll and ssleay32.dll) in /usr/lib/ however, when I build (using the python build tool node-waf), I get errors such as undefined reference to _DH_new

I have tried various things in the cxxflags section of the build script, which now looks like this:

ppp.cxxflags = ["-g", "-D_FILE_OFFSET_BITS=64", "-D_LARGEFILE_SOURCE", "-Wall", "-L/usr/lib", "-lssl","-llibeay32","-lssleay32"]


Libcrypto.so is Linux's dynamically linked library. According to this on Windows You need to use libeay32.a and ssleay32.a. If that doesn't work You have to make your own library from OpenSSL source.

0

上一篇:

下一篇:

精彩评论

暂无评论...
验证码 换一张
取 消

最新问答

问答排行榜