Skip to content
New issue

Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.

By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.

Already on GitHub? Sign in to your account

Add support for compiling multiple .ino and .pde files #49

Open
sudar opened this issue May 31, 2013 · 3 comments
Open

Add support for compiling multiple .ino and .pde files #49

sudar opened this issue May 31, 2013 · 3 comments

Comments

@sudar
Copy link
Owner

sudar commented May 31, 2013

After c64f38a we can't compile if we had multiple .ino or .pde files. (The support for multiple files was anyways broken before #39 )

One approach is to concatenate all files together into one big .cpp file and compile that. Arduino IDE does this together with some more preprocessing at https://github.com/arduino/Arduino/blob/master/app/src/processing/app/preproc/PdePreprocessor.java

I am open for other suggestions as well.

@michaelbaisch
Copy link

As I mentioned in #59, I wrote a preprocessor, which also combines all Arduino source files.

@jabberabbe
Copy link

There’s also the official Arduino preprocessor:
https://github.com/arduino/arduino-preprocessor

@MalcolmBoura
Copy link

I would like to see a rather different approach. Rather than a single executable from multiple .ino files, create a separate executable from each .ino file. That way a library can have an examples directory with multiple examples in it without having to introduce another layer of directories.
examples/example_A.ino
examples/example_B.ino
...

Alternatively provide a way to specify which .ino files (or .cpp) should be used to generate which executable.

saintaardvark added a commit to saintaardvark/arduino-wx that referenced this issue Mar 29, 2024
The Arduino Makefile does not support multiple ino
files (sudar/Arduino-Makefile#49), and I'm
not familiar enough with C/C++ to break things out into separate
c/cpp/header files.  For now, I'm sticking with this.

Signed-off-by: Hugh Brown (Saint Aardvark the Carpeted) <aardvark@saintaardvarkthecarpeted.com>
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Projects
None yet
Development

No branches or pull requests

4 participants