Openssl / bn.h: No such file or directory

I am completely new to Obj-C and am trying to compile Objective-C files with a large number.

The function was simple, just to initialize a large number and use NSLog to print it.

I used

#import <openssl/bn.h> 

but xcode always displays me an error:

openssl / bn.h: There is no such file or directory.

I tried to find out if the .h file was missing and printed it in my terminal:

$ find 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

I seem to have a bn.h file, but why didn't xcode let me compile?

Thanks for any help!

+4
source share
3 answers

I would say that OpenSSL headers are part of the Mac OS X environment, not part of the iOS environment. I want OpenSSL for iOS, you need to compile it yourself. You will find some help there (or, alternatively, there ).

+5
source

To use openssl / bn.h on Linux:

 $ sudo apt-get install libcurl4-openssl-dev 
+7
source

I had this exact problem, tried libcurl4-openssl-dev , which did not work, but found the following exact and correct solution elsewhere:

 sudo apt-get install libssl-dev 

I am working on the Raspberry Pi 3 that Jessie runs on trying to compile hostapd, but I'm sure the solution is common across a wide range of distributions and projects, especially if you change apt-get to yum or another package manager.

+3
source

All Articles