UPDATED PROGRESS
I am sorry I forgot to specify this question as an Arduino question. I just assumed that it's a preprocessor problem which is kind of independent of what platform this is being executed on.
I am using Arduino-Make and I am trying to pass in USERNAME and PASSWORD
BOARD_TAG = mega2560
CPPFLAGS = -DUSERNAME="$(USERNAME)" -DPASSWORD="$(PASSWORD)"
include $(ARDMK_DIR)/Arduino.mk
Command line:
make USERNAME="HELLO" PASSWORD="WORLD"
Code:
void setup() {
Serial.begin(9600);
String auth_raw2(USERNAME : PASSWORD);
Serial.println(auth_raw2);
}
void loop() {}
I am getting this error:
macro.ino:10:29: error: found ‘:’ in nested-name-specifier, expected ‘::’
macro.ino:10:20: error: ‘HELLO’ has not been declared
See Question&Answers more detail:os