-
去http://www.openssl.org/source/下载了最新源码****openssl-1.0.1j.tar.gz****
-
在解压的文件下执行: ./configure BSD-generic32 --openssldir=/Users/<名字>/Desktop/openssl-1.0.1j/i386
-
更改Makefile文件中:
CC= gcc
CFLAG= -DOPENSSL_THREADS -pthread -D_THREAD_SAFE -D_REENTRANT -DDSO_DLFCN -DHAVE_DLFCN_H -DTERMIOS -O3 -fomit-frame-pointer -Wall为:
CC= gcc -arch x86_64
CFLAG= -DOPENSSL_THREADS -pthread -D_THREAD_SAFE -D_REENTRANT -DDSO_DLFCN -DHAVE_DLFCN_H -DTERMIOS -O3 -fomit-frame-pointer -Wall -isysroot /Applications/Xcode.app/Contents/Developer/Platforms/iPhoneSimulator.platform/Developer/SDKs/iPhoneSimulator8.1.sdk -
make
报错:
clang: warning: argument unused during compilation: ‘-pthread’
ld: building for MacOSX, but linking against dylib built for iOS Simulator file ‘/Applications/Xcode.app/Contents/Developer/Platforms/iPhoneSimulator.platform/Developer/SDKs/iPhoneSimulator8.1.sdk/usr/lib/libSystem.dylib’ for architecture x86_64
clang: error: linker command failed with exit code 1 (use -v to see invocation)
make[2]: *** [link_app.] Error 1
make[1]: *** [openssl] Error 2
make: *** [build_apps] Error 1