比如,编译
libcurl 时的头文件的路径 ~/tmp/iphonelib/curl/include 。代码例子
下来,让我们看看在程序中使用 libcurl 的例子。下面的例子在 AppDelegate.m 中实现。
#import "AppDelegate.h"
#include <curl/curl.h>
@implementation AppDelegate
-(void)applicationDidFinishLaunching:(UIApplication *)application {
window = [[UIWindow alloc] initWithFrame:[[UIScreen mainScreen] bounds]];
// Override point for customization after application launch
[window makeKeyAndVisible];
CURL *curl;
CURLcode res;