0

I have a project, using the current version of Xcode and llvm.
I am doing a free and paid version of a game, so I have set up a preprocessor flag to do it.

For the paid version target I define PAID_VERSION = 1 (in the "User-Defined" section of Build Settings)

When I compile however the PAID_VERSION keeps coming up with undefined.
So my #ifndef and #ifdef directives build the free version of the app.

I have looked around Stack Overflow and Google and found no hints as to what is going on here.

Brian Tompsett - 汤莱恩
  • 5,753
  • 72
  • 57
  • 129
Mathew Frank
  • 736
  • 5
  • 12

1 Answers1

0

In the Other C Flags section add -DPAID_VERSION=1

This will define PAID_VERSION as 1, equivalent to #define PAID_VERSION 1 in code.

Regexident
  • 29,441
  • 10
  • 93
  • 100
Mathew Frank
  • 736
  • 5
  • 12