Cocoa Puffs
Cocoa Puffs

Reputation: 774

XCode linking to OpenSSL library

I've got a project that needs to link against the openssl libraries, although when i compile i have some issues.

#include <openssl/bn.h>
#include <openssl/md5.h>

initially told me openssl was not found, so i compiled it from source and copied the openssl directory into my project. The errors went away regarding the openssl, although I received a new error which stated:

applink.c

Lexical or Preprocessor Issue
'io.h' file not found 

so this leads me to believe i'm not including the openssl library properly. can anyone give me some indication on how to accomplish this?

XCode version 5.0.2 / SDK = 10.8 / Target OS = 10.6 / i386 x84_86

Upvotes: 2

Views: 6657

Answers (2)

Cocoa Puffs
Cocoa Puffs

Reputation: 774

Solved by linking:

libssl and libcrypto to target

Upvotes: 5

Gordon Childs
Gordon Childs

Reputation: 36169

I don't think 'io.h' is an OpenSSL file. Are there any spaces in your Header Search Paths in the project's Build Settings? If so quote them like so: "My OpenSSL/includes"

Upvotes: 1

Related Questions