使用外部库给出错误Apple Mach-O链接器错误组

时间:2017-08-13 15:39:04

标签: ios objective-c sqlite

我已将这些库导入到项目

1- BWUtilities

2- BWDB

程序在BWDB库的insertRow函数中给出错误。

- (void) updateRow:(NSDictionary *) record forRowID:(NSNumber *) rowID {
    // NSLog(@"%s", __FUNCTION__);
    int dictSize = [record count];

    // see comments above in insertRow:
    NSMutableData * dKeys = [NSMutableData dataWithLength: sizeof(id) * dictSize];
    NSMutableData * dValues = [NSMutableData dataWithLength: sizeof(id) * dictSize];
    [record getObjects:(__unsafe_unretained id *)dValues.mutableBytes andKeys:(__unsafe_unretained id *)dKeys.mutableBytes];

    // append the rowID for the where clause
    [dValues appendBytes:&rowID length:sizeof(id)];

    // build the query
    NSString * query = [NSString stringWithFormat:@"update %@ set %@ = ? where id = ?",
                        tableName,
                        [[record allKeys] componentsJoinedByString:@" = ?, "]];
    [self bindSQL:[query UTF8String] withVargs:(va_list)dValues.mutableBytes];
    sqlite3_step(statement);
    sqlite3_finalize(statement);
}

语义问题组 -

1-使用过的类型' va_list' (又名' __ builtin_va_list')需要算术或指针类型

上述功能

 [self bindSQL:[query UTF8String] withVargs:(va_list)dValues.mutableBytes];

我如何删除这些错误?您可以从此链接下载示例项目。https://drive.google.com/file/d/0B5pNDpbvZ8SnZUtIN215MWhURFE/view?usp=sharing enter image description here

类似的问题是Used type va_list (aka_builtin_va_list) where arithmetic or pointer type is required in BWDB.m file

0 个答案:

没有答案