openssl/bn.h: No such file or directory
I am totally new to Obj-C, and trying to compile Big Number related Objective C files
The function was easy, just to initialize a big number and use NSLog to print it out.
I used
#import <openssl/bn.h>
but the xcode always displays me an error:
openssl/bn.h: No such file or directory.
I tried to find out if the .h file were missing, and typed locate in my terminal:
$ locate bn.h
/Developer/SDKs/MacOSX10.6.sdk/usr/include/openssl/bn.h /usr/include/openssl/bn.h /usr/local/texlive/2010/texmf-dist/tex/generic/hyph-utf8/patterns/txt/开发者_运维问答hyph-bn.hyp.txt
It seemed I have the bn.h file, but why the xcode kept me from compiling?
Thanks for any help!!
I had this exact problem, tried libcurl4-openssl-dev
which didn't work, but found elsewhere that the following is the exact and proper solution:
sudo apt-get install libssl-dev
I'm working on a Raspberry Pi 3 running Jessie trying to compile hostapd, but I'm pretty sure the solution is generic across a wide range of distributions and projects, particularly if you swap apt-get
for yum
or other package manager.
To use openssl/bn.h on Linux:
$ sudo apt-get install libcurl4-openssl-dev
I would say that the OpenSSL headers are part of the Mac OS X environment, not part of the iOS environment. I you want OpenSSL for iOS, you need to compile it yourself. You'll find some help there (or alternatively there).
精彩评论