GreyGnome / EnableInterrupt

New Arduino interrupt library, designed for Arduino Uno/Mega 2560/Leonardo/Due
329 stars 73 forks source link

Use in library #34

Closed engwan closed 8 years ago

engwan commented 8 years ago

My main sketch and a library I wrote are using EnableInterrupt. That means I have to include EnableInterrupt twice - in my main sketch and in my library.

The linker is giving me "multiple definition" errors. I've read about similar errors (https://forum.arduino.cc/index.php?topic=351281.15) and I believe it is caused by having the definitions inside the .h file instead of in a separate file.

GreyGnome commented 8 years ago

See https://github.com/GreyGnome/EnableInterrupt/wiki/FAQ#I_cannot_include_the_EnableInterrupt_library_in_my_own_library

On Tue, Jun 7, 2016 at 9:19 PM, Heinrich Lee Yu notifications@github.com wrote:

My main sketch and a library I wrote are using EnableInterrupt. That means I have to include EnableInterrupt twice - in my main sketch and in my library.

The linker is giving me "multiple definition" errors. I've read about similar errors (https://forum.arduino.cc/index.php?topic=351281.15) and I believe it is caused by having the definitions inside the .h file instead of in a separate file.

— You are receiving this because you are subscribed to this thread. Reply to this email directly, view it on GitHub https://github.com/GreyGnome/EnableInterrupt/issues/34, or mute the thread https://github.com/notifications/unsubscribe/ADSimbDy9A_6UtWEIGFjnolbhsq_Kz79ks5qJibIgaJpZM4IwiO9 .

-Mike Schwager

engwan commented 8 years ago

Sorry didn't see that.