user62948: I wanted to compile a project yesterday which always worked until now. Probably since an adjustment of the libraries (update) I have not been able to do this anymore. I ask for help.
ERRORMESSAGE:
exit status 1
expected ':' before '{' token
Line from Error
#define MSG_PRINT(...) { MSG_PRINTER.print(__VA_ARGS__); }


user4143: MSG_PRINT is a macro.  It gets replaced in your code verbatim before compilation.
The error message will give you more information. Specifically it will tell you where the error is. For example:
/tmp/untitled1/untitled1.ino: In function 'void loop()':
/tmp/untitled1/untitled1.ino:1:24: error: expected ':' before '{' token
/tmp/untitled1/untitled1.ino:12:13: note: in expansion of macro 'MSG_PRINT'

Here I have defined MSG_PRINT at line 1, which is where it "says" the error is. However that's only where the macro is. The actual error is at line 12, where the error says the macro is being expanded. That's the last line in the error message.
The little bit of code I used to trigger that error is actually a switch command where I deliberately omitted the : at the end of a case statement:
    switch (v) {
        case 3 // <---- missing colon here
            MSG_PRINT("foo");
            break;
    }

If we replace MSG_PRINT as the preprocessor would we end up with:
    switch (v) {
        case 3
            { Serial.println("foo"); }
            break;
    }

(I defined MSG_PRINT to just call Serial.println...) and now we can better see the context of the error.
With the expansion now in place it is obvious that there is indeed a : missing before a {, even though that { isn't immediately visible in your code.
Learning to interpret these sometimes cryptic error messages is key to working with C and C++.

62948: <p>I wanted to compile a project yesterday which always worked until now. Probably since an adjustment of the libraries (update) I have not been able to do this anymore. I ask for help.</p>

<p>ERRORMESSAGE:
exit status 1
expected ':' before '{' token</p>

<p>Line from Error</p>

<pre><code>#define MSG_PRINT(...) { MSG_PRINTER.print(__VA_ARGS__); }
</code></pre>
 4143: <p><code>MSG_PRINT</code> is a macro.  It gets replaced in your code verbatim <em>before</em> compilation.</p>

<p>The error message will give you more information. Specifically it will tell you <em>where</em> the error is. For example:</p>

<pre><code>/tmp/untitled1/untitled1.ino: In function 'void loop()':
/tmp/untitled1/untitled1.ino:1:24: error: expected ':' before '{' token
/tmp/untitled1/untitled1.ino:12:13: note: in expansion of macro 'MSG_PRINT'
</code></pre>

<p>Here I have defined <code>MSG_PRINT</code> at line 1, which is where it "says" the error is. However that's only where the macro is. The actual error is at line 12, where the error says the macro is being expanded. That's the <em>last</em> line in the error message.</p>

<p>The little bit of code I used to trigger that error is actually a <code>switch</code> command where I deliberately omitted the <code>:</code> at the end of a case statement:</p>

<pre><code>    switch (v) {
        case 3 // &lt;---- missing colon here
            MSG_PRINT("foo");
            break;
    }
</code></pre>

<p>If we replace <code>MSG_PRINT</code> as the preprocessor would we end up with:</p>

<pre><code>    switch (v) {
        case 3
            { Serial.println("foo"); }
            break;
    }
</code></pre>

<p>(I defined <code>MSG_PRINT</code> to just call <code>Serial.println</code>...) and now we can better see the context of the error.</p>

<p>With the expansion now in place it is obvious that there is indeed a <code>:</code> missing before a <code>{</code>, even though that <code>{</code> isn't immediately visible in your code.</p>

<p>Learning to interpret these sometimes cryptic error messages is key to working with C and C++.</p>
