How can I use GCrypt within an Objective-C (Cocoa) app for Mac?
Hey, I need to use the GCrypt library from within an XCode Objective-C project. I'm totally new to programming with such so apologies if this is a somewhat silly question. Is this possible and, if so, ho开发者_运维百科w may I go about it?
Thanks, Tim
You can use C in Objective C directly, so you would access GCrypt as you would in regular C.
At the most basic level, include the libcrypt source in your project and then use
#include <gcrypt.h>
In source files that you need to access the gcrypt api.
For some general info on using libraries in Xcode see this (Also includes a script called FrameworkMaker which can turn a generic library into a .framework
file.)
精彩评论