Skip to content

Commit e945d09

Browse files
committed
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
1 parent d903d81 commit e945d09

File tree

1 file changed

+1
-1
lines changed

1 file changed

+1
-1
lines changed

app/src/processing/app/preproc/PdePreprocessor.java

Lines changed: 1 addition & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -110,7 +110,7 @@ public int writePrefix(String program, String buildPath,
110110
}
111111

112112
//String importRegexp = "(?:^|\\s|;)(import\\s+)(\\S+)(\\s*;)";
113-
String importRegexp = "^\\s*#include\\s+[<\"](\\S+)[\">]";
113+
String importRegexp = "^\\s*#include\\s*[<\"](\\S+)[\">]";
114114
programImports = new ArrayList<String>();
115115

116116
String[][] pieces = PApplet.matchAll(program, importRegexp);

0 commit comments

Comments
 (0)