Compilation in Xcode fails because the associated lib was not found

I need opensl lib for some C code in my iPhone application. So I included lib in my project.

But when I compile it, Xcode causes me some errors:

error: openssl / ssl.h: No such file or directory

What is my code to include:

#include <openssl/ssl.h> 

Target settings in Xcode:

alt text http://img17.imageshack.us/img17/2266/bild3tez.png

What step am I missing to tie it right?

+4
source share
4 answers

This is not a communication problem. This is a preprocessor that cannot find the header file. You need to check where this header is located, and possibly change the settings for Xcode (or your project) to include this location.

+3
source

Since it looks like an iPhone, you won’t find it. In any case, OpenSSL is not available on the iPhone, and not on third-party applications. Compiling for a simulator can work because it has all kinds of things that real devices don't have. Obtaining this for compilation for the phone is not a starter - the header was not found because it is not there, and if you somehow use it in another copy to trick it, it will not be able to link.

+2
source

OpenSSL for iPhone is available at http://www.therareair.com/2009/01/01/tutorial-how-to-compile-openssl-for-the-iphone/

Compiled libraries are also at the end of the article.

+1
source

Well, when the linked library is not found, I will now go here to see in which library / structure I need to set the link.

I know that your problem was something else, but it should be useful to others.

http://developer.apple.com/iPhone/library/documentation/Xcode/Conceptual/iphone_development/910-A-iPhone_Simulator_Frameworks/iphone_simulator_frameworks.html

Alternatively, to link the libraries, go to the xcode targets area. Expand this area until you find "link binary with libraries". Right click and add existing structure. Click on the plus at the bottom, and then find the desired library and add it.

+1
source

All Articles