-
Notifications
You must be signed in to change notification settings - Fork 448
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 symbol declaration from other ino files #39
Comments
Yeah that's there in my TODO list. Will add it. I am thinking of writing a preprocessor that will add all symbols using Do you have a better suggestion? On Sat, Dec 22, 2012 at 3:15 PM, Ludovic Lacoste
|
Yeah, seems difficult to implement Makefile-style... |
IIUC, the Arduino IDE concatenates all files together into one big .cpp file and compiles that. I think the only way to get the same results is to actually do that, any other trickery modifying the source code will probably behave differently in some corner case or another (think about symbol ordering, preprocessor macro's, etc.). Perhaps it makes sense to, if multiple .ino (and/or .pde?) files are present, just generate a .cpp file that |
Yes, I agree with what you are saying. Sometime back, I went though Arduino source code to find out what are all the pre processing that are done by Arduino and found that it all happens in this file https://github.com/arduino/Arduino/blob/master/app/src/processing/app/preproc/PdePreprocessor.java
Yes, even I think this is the best approach. PS: I also noticed that you have already done most of it at c64f38a and 1f043bb. Thanks. |
When we have multiple ino files in a project, we can't use functions from other ino files like we do in the arduino editor.
The solution I found in order to maintain the compatibility with the standard editor is to add "extern" declarations of the symbols I need to use on top of the ino file in which I use them.
Would it be possible to make this automatic?
The text was updated successfully, but these errors were encountered: