Header bug?
blittled
Posts: 681
I am building a library and have the following code
header file
This produces the error "unknown type name uint32_t" error when compiling with a file using #include in the header file for both functions, should this happen?
void PULSE(int pin, uint32_t duration) { int mask = 1 << pin; DIRA |= mask; OUTA |= mask; DELAY(duration); OUTA &= ~mask; } void DELAY(uint32_t duration) { uint32_t time; time = CNT; waitcnt(duration + time); }
header file
void PULSE(int pin, uint32_t duration); void DELAY(uint32_t duration);
This produces the error "unknown type name uint32_t" error when compiling with a file using #include in the header file for both functions, should this happen?
Comments
Did you include stdint.h? That is where uint32_t is defined.
propeller-elf-gcc -o pulse.o -c pulse.c
propeller-elf-gcc -o pulse.elf pulse.o main.c