Type 'size_t' cannot be resolved

i tried to use eclipse to compile my arduino code, but unfortunately, some of the types cannot be resolved.

#ifndef Print_h
#define Print_h

#include <inttypes.h>
#include <stdio.h> // for size_t

#include "WString.h"
#include "Printable.h"

#define DEC 10
#define HEX 16
#define OCT 8
#define BIN 2

class Print
{
  private:
    int write_error;
    size_t printNumber(unsigned long, uint8_t);
    size_t printFloat(double, uint8_t);

as the stdio.h is already involved, the size_t still cannot be resolved. not sure why

Try:

#include <stddef.h>

Are you including Arduino.h anywhere in your program?

econjack:
Try:

#include <stddef.h>

Hi ,

These h or cpp files are from the core package, i think we don't have to change it. right ?

Delta_G:
Are you including Arduino.h anywhere in your program?

the head or source files are from the Arduino core package, do we have to change the care package files ?

If you are using a different IDE you probably want to include Arduino.h.

The normal IDE does automatically.