From e945d091c5c158c59dcfdbb61391065e3a0a1318 Mon Sep 17 00:00:00 2001 From: "David A. Mellis" Date: Sat, 14 Jul 2012 21:42:59 -0400 Subject: [PATCH] Don't require a space between #include and < or ". The space isn't required by the compiler, but the preprocessor needed one in order to use the #include to figure out which libraries the sketch used. That caused an error if you didn't have the space, because the corresponding library wasn't linked. http://code.google.com/p/arduino/issues/detail?id=975 --- app/src/processing/app/preproc/PdePreprocessor.java | 2 +- 1 file changed, 1 insertion(+), 1 deletion(-) diff --git a/app/src/processing/app/preproc/PdePreprocessor.java b/app/src/processing/app/preproc/PdePreprocessor.java index 4f848c922..85ab95ba6 100644 --- a/app/src/processing/app/preproc/PdePreprocessor.java +++ b/app/src/processing/app/preproc/PdePreprocessor.java @@ -110,7 +110,7 @@ public class PdePreprocessor { } //String importRegexp = "(?:^|\\s|;)(import\\s+)(\\S+)(\\s*;)"; - String importRegexp = "^\\s*#include\\s+[<\"](\\S+)[\">]"; + String importRegexp = "^\\s*#include\\s*[<\"](\\S+)[\">]"; programImports = new ArrayList(); String[][] pieces = PApplet.matchAll(program, importRegexp);