Show Posts

This section allows you to view all posts made by this member. Note that you can only see posts made in areas you currently have access to.

Messages - kroimon

Pages: [1]
Core/Cross-platform Library Questions / Re: Duplicate file names
« on: January 30, 2012, 01:54:47 PM »
Yeah, I tested it and it seems to work.

As I mentioned above, this fix may not be backwards compatible to old sketches that include libraries using the #include "..." syntax with quotes and limits library loading to the #include <...> syntax.

If you choose this fix you have to clearly announce it with the next release so that old sketches can be adapted.

The other way to fix this - only include libraries when there is no equally named file in the current sketch - looks equally easy to implement, but I have no idea where ;-)
Core/Cross-platform Library Questions / Re: Duplicate file names
« on: January 30, 2012, 05:11:43 AM »
Ok, as I need to compile my project and don't want to change filenames (besides Button.* there is also a Matrix.* which get confused with a built-in library) I recompiled my own version of the Wiring IDE changing to
Code: [Select]
String importRegexp = "^\\s*#include\\s+<(\\S+)>";
Hope to get an official fix for this soon, and I'm really looking forward for the IDE independent compilation ;)
Core/Cross-platform Library Questions / Duplicate file names
« on: January 28, 2012, 05:30:16 PM »

I wanted to compile an existing Arduino project with Wiring because I think some of your stuff is pretty cool and the Arduino development seems to be a little behind...
Anyway, I adapted all "Arduino.h" includes to "Wiring.h" etc and clicked "Verify". It failed.

So why did it fail? I have a file called "Button.h" (and the corresponding "Button.cpp" in my sketch. So my .pde has a line
Code: [Select]
#include "Button.h"The problem is: the IDE matches this line against my file AND the bundled Button library file. Therefore, it tries to link against to different Button.cpp.o files which obviously fails as both of them define different Button classes.

I propose the following change:
Ignore those library files that have the same name as a file in the sketch folder. This change should be backwards compatible.
Another approach would be to only accept
Code: [Select]
#include <...> for library files and interpret
Code: [Select]
#include "..." as local sketch files. I think that would be clean, but could break old code.

In hope of a quick fix,
best regards,
Pages: [1]