Skip to content
New issue

Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.

By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.

Already on GitHub? Sign in to your account

Example project wont build when path has space in it #634

Open
richardgroves opened this issue Jan 12, 2016 · 0 comments
Open

Example project wont build when path has space in it #634

richardgroves opened this issue Jan 12, 2016 · 0 comments
Labels

Comments

@richardgroves
Copy link

If you clone the repo into a path that has a space in it, the follow the instructions for building the Example project it will fail to build.

The error appears to be the expansion of the $(SOURCE_ROOT) variable into the Preprocessor macro value for FB_REFERENCE_IMAGE_DIR in the project build settings.

It leads to a part of the command line reading (for a build folder of /Users/richard/Test Folder With Spaces/TTTAttributedLabel/Example):

-DDEBUG -DCOCOAPODS=1 -DFB_REFERENCE_IMAGE_DIR=\"/Users/richard/Test -DFolder -DWith -DSpaces/TTTAttributedLabel/Example/TTTAttributedLabelTests/ReferenceImages\" -DOBJC_OLD_DISPATCH_PROTOTYPES=0

which isn't going to end well. The first (of 20) errors thrown is:

In file included from <built-in>:338:
<command line>:4:32: warning: missing terminating '"' character [-Winvalid-pp-token]
#define FB_REFERENCE_IMAGE_DIR "/Users/richard/Test

From the answer here: http://stackoverflow.com/questions/6052220/xcode-srcroot-not-working-even-though-paths-seem-to-exist/6060537#6060537 I tried setting the Preprocess Macro line to:

FB_REFERENCE_IMAGE_DIR=\""$(SOURCE_ROOT)/TTTAttributedLabelTests/ReferenceImages\""

and that makes it build (for clarity - added extra un-escaped " inside the escaped one to get XCode to expand the path nicely).

Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
Projects
None yet
Development

No branches or pull requests

2 participants