Source: https://mokxi.com/errors/redeclared-as-different-kind-of-symbol
Updated: 2026-11-16

Home / Errors
Arduino build error

# error: 'led' redeclared as different kind of symbol

A name can mean one thing at a time. The sketch uses it for a variable and for a function, or for a variable and a name the Arduino core already uses.

Try the fixed sketch in Mokxi See the causes

- Build error
- 2 common causes
- Seen 354 times in failed builds on Mokxi in the 30 days to November 16, 2026.

The message

## What the Arduino IDE prints

Output window

Rename one of them.

Mokxi's compiler, clang, words it as redefinition of 'led' as different kind of symbol.

Causes

## The 2 usual causes with the fix

### 1A variable and a function share a name

Give the function a verb and the variable a noun, such as ledPin and blinkLed.

Broken

Fixed

Mokxi’s build tab says: led is already the name of something in the board's core or a library

Try this fix in Mokxi

### 2A variable is named like an Arduino function

millis, delay, random and others are already functions. A variable with the same name clashes with them. Pick another name.

Broken

Fixed

Mokxi’s build tab says: millis is already the name of something in the board's core or a library

Try this fix in Mokxi

FAQ

## Questions and answers

### What is a symbol?

A name in the program: a variable, a function or a type. A symbol is one kind of thing at a time.

### How do I know which names are taken?

The Arduino language reference lists them. Names with a capital in the middle, such as digitalWrite, are the core.

### Does it matter that one is a global and one is local?

A local variable hides the global of the same name. Two globals or a global and a function clash.

Next

## More errors and the longer guide

- multiple definition of 'counter'
- error: 'ledPin' was not declared in this scope

The longer guide to redefinition All Arduino errors
