How to fix Keil error C129: "missing ';'" without any missing semicolon (EFM8)
Problem:
You have source code like
uint16_t convert(uint16_t input) {
return input * 2;
}
that you want to compile using EFM8
// *** ERROR C129 IN LINE 1 OF C:\Users\user\TestProject\src\Test.c: missing ';' before 'convert'
Solution
Keil doesn’t know what the uint16_t
before the declaration of convert()
.
#include <stdint.h>
stdint.h
contains declarations for several standard integer types like uint8_t
, uint16_t
, uint32_t
, int16_t
etc.
The final code should look like this:
#include <stdint.h>
uint16_t convert(uint16_t input) {
return input * 2;
}