arduino-makefile icon indicating copy to clipboard operation
arduino-makefile copied to clipboard

Library with same file name as arduino core filename yields linking error

Open Sembiance opened this issue 9 years ago • 3 comments

I was trying to use the FastLED library, which happens to have a 'wiring.c' file.

Because your Makefile compiles all source files into the same directory, this overwrites the 'wiring.cpp' output from arduino core, thus leading to a linker error.

I've been using https://github.com/arons/ArduinoDevel/ in the mean time as a workaround.

Sembiance avatar Dec 09 '15 21:12 Sembiance

I suppose that the library files could be appended with a -lib, so in your case the files would be wiring.ino and wiring-lib.c

Would this be acceptable?

tomswartz07 avatar Dec 14 '15 19:12 tomswartz07

That would fix it my particular issue, but if you had different libraries that had the same source filename, that wouldn't work for them. So it would only be a partial fix for the more general problem.

It's not that big a deal for me, as the other Arduino makefile project I linked seems to work just fine so I'll probably just continue using that. I just thought I would report the bug just in case.

Sembiance avatar Dec 14 '15 20:12 Sembiance

I suppose I was misunderstood; I'll clarify.

The makefile will copy over the library files with the appended name, so this will fix the naming issue for any case where the *.ino file name maches the library.

I'll try to get the fix up later today or tomorrow.

Thanks again for reporting it!

tomswartz07 avatar Dec 14 '15 20:12 tomswartz07