开发者

How can I use GCrypt within an Objective-C (Cocoa) app for Mac?

开发者 https://www.devze.com 2023-01-30 09:02 出处:网络
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.

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

0

精彩评论

暂无评论...
验证码 换一张
取 消