Serial was not declared

Hi, all

In case of Separate compilation, using Serial.print in the ico file

'Serial' was not declared in this scope

It will result in an error with.
In cpp or h file, I should declare extern, but what should be declared as Serial's type ?

Or, where is it defined ?

Thank you.

saitoib:
Or, where is it defined ?

Here:

Your post is extremely unclear but you should be aware that the Arduino IDE automatically adds the line:

#include <Arduino.h>

to every sketch prior to compilation.

I solved it.

Thank you very much.