platformio / platformio/platformio-core

Ensuring that there is no 'main()' function in user's code when compiling for Arduino

Open
#230 0 comments 0 reactions 1 assignee View on GitHub

@ivankravets is already working on this.

Since Jun 7, 2015.

build system enhancement
Dominant language
Python
Stars
9.5k
Forks
905
Avg merge
2d 13h
Merged PRs (30d)
2

Description

Arduino provides its own staff including their own 'main()' function. If user's code happens to have a 'main()' function, too, it can be silently used by a compiler instead of one from Arduino thus producing undesired result. As a potential solution it might be good, in case of Arduino (or, more generally, in case of any framework providing its own code) to check whether user-defined code has a 'main()' function and to report an error.

Contributor guide

Open the contributing guide

First steps

  1. Read the whole issue, then the project's contributing guide.
  2. Comment on the issue to say you are picking it up — it saves two people doing the same work.
  3. Fork the repository and make your change on a branch.
  4. Open a pull request that references the issue number.

Assessment

This issue has not been assessed yet.

Get new issues in your inbox

A short digest of beginner-friendly GitHub issues.