4

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.

1
  • appears to be just warning, so is there a problem to build it or run ? Commented Jul 25, 2014 at 15:55

3 Answers 3

5

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.

Sign up to request clarification or add additional context in comments.

Comments

2

Remove the MAX and MIN macro definitions from the sqlite3.c file, since they are already defined in system headers.

Comments

1

Issue Solution: Open Xcode project Build settings

add “-Wno-ambiguous-macro” into “Other C flags”

Comments

Your Answer

By clicking “Post Your Answer”, you agree to our terms of service and acknowledge you have read our privacy policy.

Start asking to get answers

Find the answer to your question by asking.

Ask question

Explore related questions

See similar questions with these tags.