function uint16_t is not a type name

I have the code:

#include <stdint.h>

volatile uint16_t sample;

Which is builds fine in the Arduino IDE, but in Sublime Text 2 (with Stino) and VisualMicro, I get the error:

"function uint16_t is not a type name"

Can anyone tell me how to fix this?

Thanks,

Slicc

Include "types.h"?

Unfortunately that doesn't work either, the uint16_t is actually declared in the stdint.h file, so it looks like Sublime and VisualMicro are not correctly importing the header files?

Slicc

define them yourself as a last resort:

#ifndef __STDINT_H_
    typedef int int16_t;
    typedef unsigned int uint16_t;
#endif

Seems if I add:

#include "Arduino.h"

it works fine.

Thanks,

Slicc