简体   繁体   中英

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, how 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.)

The technical post webpages of this site follow the CC BY-SA 4.0 protocol. If you need to reprint, please indicate the site URL or the original address.Any question please contact:yoyou2525@163.com.

 
粤ICP备18138465号  © 2020-2024 STACKOOM.COM