Aggregate ‘BIGNUM foo’ has incomplete type and cannot be defined

后端 未结 1 1878
南笙
南笙 2020-12-20 15:57

I tried to compile opendcp, but error occurred.

$ make

...

[ 10%] Building CXX object libasdcp/CMakeFiles/opendcp-asdcp.dir/KM_prng.cpp.o
/home/jwel/opendc         


        
相关标签:
1条回答
  • 2020-12-20 16:42

    There were big changes between OpenSSL 1.0.2 and OpenSSL 1.1.0 and they are not fully source compatible. Specifically many data structures which were in the 1.0.2 header files are now opaque. Applications that use OpenSSL need to make some small changes to be compatible.

    In the case of BIGNUM, you need to do it like this:

    #include <openssl/bn.h>
    int main() {
        BIGNUM *bn;
    
        bn = BN_new();
    
        ...
        BN_free(bn);
    
        return 0;
    }
    

    In the case of opendcp probably the answer is to just downgrade to OpenSSL 1.0.2 instead.

    0 讨论(0)
提交回复
热议问题