0

I'm currently trying to make a connection from my iOS app to a MySQL database using OHMySQL but i seem to have a problem.

The query:

OHMySQLQueryRequest *query = [OHMySQLQueryRequestFactory INSERT:@"tasks" set:@{ @"name": @"Something", @"desctiption": @"new task" }];
NSError error;
[queryContext executeQueryRequest:query error:&error];

Before building i get an error saying:

NSError error; Interface type cannot be statically allocated

The system gives a suggestion to add * before the error, i've tried doing that but i get an error saying framework not found

Anyone maybe encountered this error and know what would be the fix? Thanks!

ToothFairy
  • 41
  • 9
  • 1
    Does this answer your question? [Interface type cannot be statically allocated?](https://stackoverflow.com/questions/8460340/interface-type-cannot-be-statically-allocated) – Willeke Aug 17 '21 at 07:13
  • Try this: `NSError *error = nil;` – Ely Aug 17 '21 at 07:57
  • https://developer.apple.com/library/archive/documentation/Cocoa/Conceptual/ErrorHandlingCocoa/CreateCustomizeNSError/CreateCustomizeNSError.html#//apple_ref/doc/uid/TP40001806-CH204-BAJIIGCC and as said by @Ely, it's missing a `*`. – Larme Aug 17 '21 at 08:40

0 Answers0