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.

Topics - kroimon

Pages: [1]
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]