# Your own IDE won't compile it — even though the code is already working. Here's why.

> Compiling in your own IDE instead of flashing from the browser? A local compile error is almost always a toolchain difference, not a defect in the code.

[HTML version](https://soldr.ai/docs/sketch-wont-compile)

[Docs](https://soldr.ai/docs) / When it doesn't work

You've got generated code for your build. Instead of flashing it straight from the browser, you copied it into the Arduino IDE (or PlatformIO), hit compile, and it throws an error before it even reaches the board.

3 min read
Diagnosis
Any board

## What you're seeing

Your own IDE stops with red text before anything reaches the board — a missing library, an undefined reference, a type mismatch, or a board package that isn't installed. Nothing has been flashed yet; this is a build-time failure in your local setup, not a runtime one.

## Why this is a local-setup question, not a code question

Code is generated for one of **674 supported board targets**, and flashing straight from the browser needs nothing installed on your end at all. Taking that same code into your own IDE instead — a real, supported path, not a workaround — means it now has to compile against whatever board packages and library versions you happen to have installed locally, which is a different toolchain than the one the code was written and generated against.

## So why does it fail to compile in your own IDE?

Because a local compile error almost always means something is different between your setup and the one the code was generated for — not that the code itself is wrong:

- **A board package isn't installed locally yet** — some board families (ESP32, certain ARM cores) need their board support package added in your IDE before anything for that board will compile, separate from whether the sketch itself is correct.

- **A library version mismatch on your machine** — a library you have installed updated its function names or signatures since the code was generated, and your installed version doesn't match what the code expects.

- **You edited the code after generating it** — even a small hand-edit can introduce a syntax issue that wasn't there in what was checked.

## What to actually do

- **Read the first error, not the last one** A single real problem often cascades into a dozen follow-on errors below it. The first error in the log is usually the actual cause; the rest are often noise from the compiler giving up partway through a file.

- **Check whether the board package is installed** In the Arduino IDE: Tools > Board > Boards Manager, search for your board family, and confirm it's installed — this alone resolves a large share of first-time compile errors.

- **Copy the exact error text** Not a paraphrase of what went wrong — the literal compiler output, including the file and line it names.

- **Report it back with the exact error** Share the specific error text alongside the code that produced it. A precise error is fixable; "it doesn't compile" on its own isn't enough to act on.

> [screenshot] Arduino IDE showing a compile error in red at the bottom of the console, with the specific error line highlighted, and Boards Manager open beside it showing an uninstalled board package.

## A worked example

A build targeting an ESP32-S3 flashes fine straight from the browser. Copied into the Arduino IDE instead, it fails to compile with an error naming a missing header for a library the build called. Two likely causes, in order of likelihood: the ESP32 board package itself isn't installed locally (checked first, in Boards Manager), or the local library version is older than the one the code was written against (checked second, in the Library Manager). Both are a few minutes to fix once identified — the local error text itself usually names which one it is, and neither means the generated code was wrong.

| Part | Why it's there | Price |
|---|---|---|
| ESP32-S3 SuperMini | the board in this example | ₹587 |
| Core of the example | the fix is a toolchain setup step, not a part | ₹587 |

## What this means for your build

A compile failure in your own IDE is a toolchain-setup question, not a sign the design itself is wrong — and if you just want the code running on the board without wrestling with a local setup, flashing straight from the browser skips this entirely. The fastest path through a local error, if you do want your own IDE, is always the same: the exact error text, not a description of the symptom.

> **Reporting an error is free** — Sharing a compile error and getting help reading it doesn't cost credits. Credits are spent when code is generated, not when you're troubleshooting it.

## If it still won't compile

- Confirm the correct board is selected in your IDE's Tools > Board menu — a local compile can fail entirely if the wrong board family is targeted.

- Try compiling a minimal blink sketch for the same board first — if that also fails, the issue is your local toolchain setup, not the generated code.

- Not attached to using your own IDE? Flashing straight from the browser uses the same generated code without any local toolchain to configure.

- Still stuck? Paste the complete local error output, not just the last line, alongside the sketch it came from.

[Previous Watching sensor readings live](https://soldr.ai/docs/watching-sensor-readings-live)
[Next Parts that fit together](#)
