Go Down

Topic: "Unlogical" bug in Arduino 0017 (Read 1 time) previous topic - next topic


Aug 26, 2009, 02:07 am Last Edit: Aug 26, 2009, 02:20 am by Chris.H. Reason: 1
This bug is beginning to bug me big time..

The Bug:
When adding a headerfile (.h), and then the accompanying c-file (.cpp), you aren't allowed to add the later.
As soon I try to add the cpp-file to the "project" (using the "tab-menu" and "New Tab" [Ctrl+Shift+N]) I get this error:

The solution?
Close the Arduino IDE, add the file (Ex: lib.cpp) (using another Code-editor, or Explorer/a filemananger) to the "project directory".
Reopen the Arduino IDE and the project: And voilà, the Arduino IDE has found the cpp-file and open it along with the headerfile etc...

Why "unlogical"??
1. The IDE apparently recognize the cpp-files, so this shouldn't be a program
2. "lib.h" ISN'T the same name as "lib.cpp".
3. The IDE apparently compares just the first part/the name without the extension, but as a programmer I can't see any logic in that, as that's not how the system sees it etc.
Fair enough, the "default way" is to add files without extensions to the project, but it should still be an option.

No offense to the programmers that work on the IDE (I know  you work hard, and it's easy to miss the simplest and smallest of issues..). But this problem is "ridiculous" (in the way that you should be able to ad both .h- and .cpp-files using the IDE..).

I hope that this has been corrected in the next version..
(If my Java had been better and I had the time to get into another project, I would add a fix myself...)

[edit]I added this as an issue at the google-code pages.. http://code.google.com/p/arduino/issues/detail?id=91[/edit]

Have a nice day/night..

Software: Arduino 0017
OS: Windows 7

Go Up