Xcode 9 beta 6 error "Reference to 'sqlite3_value' is ambiguous"

339 views Asked by At

I got the below compilation error in FMDB/FMDatabase.m:1404:74:

Reference to 'sqlite3_value' is ambiguous

when I test my iOS project with xCode 9 beta 6. It is working fine in xCode 8.3.2.

My FMDB library version is 2.4.

I have marked font in bold, where I got compilation error in following lines:

void FMDBBlockSQLiteCallBackFunction(sqlite3_context *context, int argc, sqlite3_value **argv); // -Wmissing-prototypes

void FMDBBlockSQLiteCallBackFunction(sqlite3_context *context, int argc, sqlite3_value **argv) {

Please find the following complete function code snippet in which I got error and also I have attache screenshot for the same here.

#pragma mark Callback function

void FMDBBlockSQLiteCallBackFunction(sqlite3_context *context, int argc, sqlite3_value **argv); // -Wmissing-prototypes
void FMDBBlockSQLiteCallBackFunction(sqlite3_context *context, int argc, sqlite3_value **argv) {  
#if ! __has_feature(objc_arc)
    void (^block)(sqlite3_context *context, int argc, sqlite3_value **argv) = (id)sqlite3_user_data(context);
#else
    void (^block)(sqlite3_context *context, int argc, sqlite3_value **argv) = (__bridge id)sqlite3_user_data(context);
#endif
    if (block) {
        block(context, argc, argv);
    }
}

I have tried to resolved it but can not found the solution for it. It would be appreciate if any help I will get.

Thank you

UPDATE: In Xcode 9(Final release), it is working fine.

1

There are 1 answers

1
TurkeyTeo On

how about 1. Clean the project 2. Delete everything inside '~/Library/Developer/Xcode/DerivedData/ModuleCache/' (the button inside the organizer window did not work for me) 3. Clean once more 4. Build project