mercredi 28 mars 2018

Openssl BIGNUM Base class has incomplete type

I am learning bitcoin original code and try to learn it by tear it down into very small peaces.

class CBigNum : public BIGNUM
{
  public:
    CBigNum()
   {
     BN_init(this);
 }
}

There is a class call CBigNum inherited from BIGNUM which is openssl class. When I try to compile it by Xcode, it always info me that Base class has incomplete type. I did search this issues, and someone said this was cause by the high version openssl v1.1.

I downgrade openssl version to v1.0.1, the issue still existed. So, I use the version bitcoin-original code used, v9.8h, the issue still existed.

macOS v10.12.6, Xcode9.2.

P.S. when I was compiling openssl v1.1 or v1.0.1 everything were good. However, when I was compiling openssl v9.8h, there were some info seem innormal /Applications/Xcode.app/Contents/Developer/Toolchains/XcodeDefault.xctoolchain/usr/bin/ranlib: file: /usr/local/openssl/lib/libcrypto.a.new(ebcdic.o) has no symbols

P.S.2: compile openssl commands

cd Downloads/openssl-0.9.8h
./config
sudo ./config --prefix=/usr/local/openssl
make
sudo make install

Aucun commentaire:

Enregistrer un commentaire