Logo Questions Linux Laravel Mysql Ubuntu Git Menu
 

Warnings with a new Xcode project using FMDB, SqliteCipher and CocoaPods

I have installed CocoaPods.. and loaded the workspace as instructed.

I am getting these warnings which I do not understand, here is an example:

Pods-CipherDatabaseSync-SQLCipher sqlite.c /Users/admin/Code/CipherDatabaseSync/Pods/SQLCipher/sqlite3.c:24035:13: Ambiguous expansion of macro 'MAX'

I have looked around for a couple of hours and I am stumped at what I need to do, can someone please point me in the direction of somewhere that will provide some insight?

Thanks.

like image 904
Nate Uni Avatar asked Feb 12 '23 10:02

Nate Uni


1 Answers

In the sqlite.c file it looks as if MIN and MAX are trying to be defined in two different areas of the file. The first time on line 214

/* Macros for min/max. */
#ifndef MIN
#define MIN(a,b) (((a)<(b))?(a):(b))
#endif /* MIN */
#ifndef MAX
#define MAX(a,b) (((a)>(b))?(a):(b))
#endif  /* MAX */

Then secondly at line 8519

/*
** Macros to compute minimum and maximum of two numbers.
*/
#define MIN(A,B) ((A)<(B)?(A):(B))
#define MAX(A,B) ((A)>(B)?(A):(B))

I commented out where they define it the second time and all of the warnings went away after cleaning and building the project again.

like image 179
Josh Valdivieso Avatar answered Apr 29 '23 19:04

Josh Valdivieso