How do I build OpenSSL as 32-bit (i386) on Mac OS X?

前端 未结 2 1706
Happy的楠姐
Happy的楠姐 2020-12-06 02:14

I downloaded OpenSSL sources, and did the config, make, sudo make install trilogy.

I then built my project, linking in libcryp

相关标签:
2条回答
  • 2020-12-06 02:38
    $ curl https://www.openssl.org/source/openssl-1.0.0a.tar.gz | tar xz
    $ cd openssl-1.0.0a
    $ export CFLAGS="-arch i386"
    $ export LDFLAGS="-arch i386"
    $ ./config
    $ make
    $ lipo -info libssl.a
    input file libssl.a is not a fat file
    Non-fat file: libssl.a is architecture: i386
    $ lipo -info libcrypto.a
    input file libcrypto.a is not a fat file
    Non-fat file: libcrypto.a is architecture: i386
    
    0 讨论(0)
  • 2020-12-06 02:41

    If anybody is looking for a solution to build dynamic libraries, this is how to do it:

    tar -xvzf <openssl gz file>
    ./Configure darwin-i386-cc -shared 
    make
    

    For 64 bit, run

    ./Configure darwin64-x86_64-cc -shared
    make
    
    0 讨论(0)
提交回复
热议问题