Hi everybody, thank you very much for your help.
I’ve been trying for a while to integrate a project of mine with blynk. Done all related examples, and they work fine separately or when I use them in the main sketch. Problem is when I try to put Blynk inside my libraries. Right now, I’m stuck at this error:
Arduino:1.8.7 (Windows 10), Tarjeta:"Arduino Pro or Pro Mini, ATmega328P (3.3V, 8 MHz)"
libraries\DARM_c\DARM_c.cpp.o (symbol from plugin): In function `DARM_c::timerListo()':
(.text+0x0): multiple definition of `_blynkTransport'
sketch\Asistente_Rehabilitacion_Marcha_v1.1.ino.cpp.o (symbol from plugin):(.text+0x0): first defined here
libraries\DARM_c\DARM_c.cpp.o (symbol from plugin): In function `DARM_c::timerListo()':
(.text+0x0): multiple definition of `Blynk'
sketch\Asistente_Rehabilitacion_Marcha_v1.1.ino.cpp.o (symbol from plugin):(.text+0x0): first defined here
collect2.exe: error: ld returned 1 exit status
Se encontraron múltiples librerías para "DARM_c.h"
Usado: C:\Users\brian\OneDrive\Documentos2\Arduino\libraries\DARM_c
No usado: C:\Users\brian\OneDrive\Documentos2\Arduino\libraries\DARM_backup
exit status 1
Error compilando para la tarjeta Arduino Pro or Pro Mini.
I think it has something to do with the library SimpleTimer I was using. I used to define in the .h
SimpleTimer_c *Timer;
and in the .cpp
Timer=new SimpleTimer_c;
and it work fine.
I tried changing SimpleTimer for Blynk timer using both pointers and non pointers, and the error on the compiler is always the same. Moreover, the method “timerListo()” that appears in the error log is
Without seeing all the code or knowing what librarys & versions you have installed, your posted snippets are too sporadic to be sure. But BlynkTimer is built into the Blynk library, so no need to add any SimpleTimer library or adjustments to other libraries (except to remove any additions you may have added?), just assign a timer name.
Hi Gunner!
They are all custom libraries I made to manage several peripherals (pressure sensor, led, debouncer, buzzer). I have one custom library with the specific functions of this project that includes all the peripheral libraries.
I didn’t post the full code because it is really long. Should I attach it anyway?
Talking about Blynk libraries, I downloaded them from this page.
I have no problem in posting my libraries and the .ino if it’s what you need to help. I tried to upload them as a .rar, but it says I can only upload images. How can I post them?
Anyway, help me understand. How can I get multiple definition errors if I just included Blynk library once?
Either as “formatted” text (IDE code) here in a post
Or links to shared files on some form of platform like Dropbox, etc.
Sorry, I for one do not understand enough about what all you are trying to compile to even guess… and if no one else chimes in, then odds are neither do they.