user70539: I have a main.ino file that contains
struct EulerAngles {
  double roll, pitch, yaw;
};

void setup() {
  EulerAngles angles;
  angles = anglesCalc();
  Serial.print(angles.yaw);
}

void loop() {
  Serial.println("In loop");
  delay(1000);                 
}

and an angles.ino file that contains
EulerAngles anglesCalc(){
   EulerAngles a;
   // calculate a
   return a;
}

When I compile the program, I get a compile error in the main.ino file:
   code/so_examples/main.ino:5:1: error: 'EulerAngles' does not name a type
 void setup() {
 ^~~~~~~~~~~
code/so_examples/main.ino: In function 'void setup()':
code/so_examples/main.ino:7:12: error: 'anglesCalc' was not declared in this scope
   angles = anglesCalc();
            ^~~~~~~~~~
code/so_examples/main.ino:7:12: note: suggested alternative: 'angles'
   angles = anglesCalc();
            ^~~~~~~~~~
            angles
[Build] Error occurred.

How do I fix this? Note that struct is declared before all else, so this answer does not seem to apply.  I am using the Stino plugin for Sublime Text as the IDE.

user70539: There is an open issue with the Stino Arduino plugin for Sublime Text which means that structs are not handled properly.
Thank you to Jura and Edgar Bonet for helping me to answer this question.

70539: <p>I have a <code>main.ino</code> file that contains</p>
<pre><code>struct EulerAngles {
  double roll, pitch, yaw;
};

void setup() {
  EulerAngles angles;
  angles = anglesCalc();
  Serial.print(angles.yaw);
}

void loop() {
  Serial.println(&quot;In loop&quot;);
  delay(1000);                 
}
</code></pre>
<p>and an <code>angles.ino</code> file that contains</p>
<pre><code>EulerAngles anglesCalc(){
   EulerAngles a;
   // calculate a
   return a;
}
</code></pre>
<p>When I compile the program, I get a compile error in the <code>main.ino</code> file:</p>
<pre><code>   code/so_examples/main.ino:5:1: error: 'EulerAngles' does not name a type
 void setup() {
 ^~~~~~~~~~~
code/so_examples/main.ino: In function 'void setup()':
code/so_examples/main.ino:7:12: error: 'anglesCalc' was not declared in this scope
   angles = anglesCalc();
            ^~~~~~~~~~
code/so_examples/main.ino:7:12: note: suggested alternative: 'angles'
   angles = anglesCalc();
            ^~~~~~~~~~
            angles
[Build] Error occurred.
</code></pre>
<p>How do I fix this? Note that struct is declared before all else, so this <a href="https://arduino.stackexchange.com/questions/66530/class-enum-was-not-declared-in-this-scope">answer</a> does not seem to apply.  I am using the Stino plugin for Sublime Text as the IDE.</p>
 70539: <p>There is an open <a href="https://github.com/Robot-Will/Stino/issues/507" rel="nofollow noreferrer">issue</a> with the Stino Arduino plugin for Sublime Text which means that structs are not handled properly.</p>
<p>Thank you to <a href="https://arduino.stackexchange.com/users/37622/juraj">Jura</a> and <a href="https://arduino.stackexchange.com/users/7508/edgar-bonet">Edgar Bonet</a> for helping me to answer this question.</p>
