ChuckBell / MySQL_Connector_Arduino

Database connector library for using MySQL with your Arduino projects.
332 stars 133 forks source link

'Ethernet' is ambiguous using QNEthernet.h #192

Open burtamus2003 opened 1 year ago

burtamus2003 commented 1 year ago

I'm using the QNEthernet.h library on my Teensy 4.1 with Ethernet. As soon as I include the MySQL_Connection.h and compile it, it throws an error that 'Ethernet' is ambiguous. Any ideas would be appreciated.

myApp:312: error: reference to 'Ethernet' is ambiguous
             if (!Ethernet.begin()) {
                  ^
In file included from C:\Users\me\Documents\Arduino\libraries\MySQL_Connector_Arduino\src/MySQL_Packet.h:44:0,
                 from C:\Users\me\Documents\Arduino\libraries\MySQL_Connector_Arduino\src/MySQL_Connection.h:39,
                 from C:\Users\me\Documents\Arduino\myApp\myApp.ino:17:
C:\Users\me\Documents\Arduino\libraries\Ethernet\src/Ethernet.h:147:22: note: candidates are: EthernetClass Ethernet
 extern EthernetClass Ethernet;
                      ^
ChuckBell commented 1 year ago

Hi,

It appears you may have another library with the same name. Find the duplicates and disable/remove the one you do not need. Or, more correctly, change the #include to include the correct Ethernet class. Removing the one you do not need is easier, though.

Dr. Bell

On Sep 5, 2022, at 6:36 PM, burtamus2003 @.***> wrote:

I'm using the QNEthernet.h library on my Teensy 4.1 with Ethernet. As soon as I include the MySQL_Connection.h and compile it, it throws an error that 'Ethernet' is ambiguous. Any ideas would be appreciated.

myApp:312: error: reference to 'Ethernet' is ambiguous if (!Ethernet.begin()) { ^ In file included from C:\Users\me\Documents\Arduino\libraries\MySQL_Connector_Arduino\src/MySQL_Packet.h:44:0, from C:\Users\me\Documents\Arduino\libraries\MySQL_Connector_Arduino\src/MySQL_Connection.h:39, from C:\Users\me\Documents\Arduino\myApp\myApp.ino:17: C:\Users\me\Documents\Arduino\libraries\Ethernet\src/Ethernet.h:147:22: note: candidates are: EthernetClass Ethernet extern EthernetClass Ethernet; ^

— Reply to this email directly, view it on GitHub https://github.com/ChuckBell/MySQL_Connector_Arduino/issues/192, or unsubscribe https://github.com/notifications/unsubscribe-auth/AB6SHYARQ7QPXDEXKOVJQXLV4ZYWRANCNFSM6AAAAAAQFKCBKM. You are receiving this because you are subscribed to this thread.

burtamus2003 commented 1 year ago

So, let me get this straight. Just by “including” your library (a single line of code) that blows up my program, I have an issue with my code. It works perfectly fine without including your lib. Hmmmm Sent with auto-corruption from my iPhoneOn Sep 5, 2022, at 17:40, Dr. Charles Bell @.***> wrote: Hi,

It appears you may have another library with the same name. Find the duplicates and disable/remove the one you do not need. Or, more correctly, change the #include to include the correct Ethernet class. Removing the one you do not need is easier, though.

Dr. Bell

On Sep 5, 2022, at 6:36 PM, burtamus2003 @.***> wrote:

I'm using the QNEthernet.h library on my Teensy 4.1 with Ethernet. As soon as I include the MySQL_Connection.h and compile it, it throws an error that 'Ethernet' is ambiguous. Any ideas would be appreciated.

myApp:312: error: reference to 'Ethernet' is ambiguous if (!Ethernet.begin()) { ^ In file included from C:\Users\me\Documents\Arduino\libraries\MySQL_Connector_Arduino\src/MySQL_Packet.h:44:0, from C:\Users\me\Documents\Arduino\libraries\MySQL_Connector_Arduino\src/MySQL_Connection.h:39, from C:\Users\me\Documents\Arduino\myApp\myApp.ino:17: C:\Users\me\Documents\Arduino\libraries\Ethernet\src/Ethernet.h:147:22: note: candidates are: EthernetClass Ethernet extern EthernetClass Ethernet; ^

— Reply to this email directly, view it on GitHub https://github.com/ChuckBell/MySQL_Connector_Arduino/issues/192, or unsubscribe https://github.com/notifications/unsubscribe-auth/AB6SHYARQ7QPXDEXKOVJQXLV4ZYWRANCNFSM6AAAAAAQFKCBKM. You are receiving this because you are subscribed to this thread.

—Reply to this email directly, view it on GitHub, or unsubscribe.You are receiving this because you authored the thread.Message ID: @.***>

ChuckBell commented 1 year ago

No, it means you have to decide which Ethernet library you want to use. Read the code and documentation concerning modifying the code to adapt it to your platform. I do not have a Teensy board else I’d try it myself. Hint: see the #include in the connector code. Fix that first.

Sent from my iPad

On Sep 18, 2022, at 21:01, burtamus2003 @.***> wrote:

 So, let me get this straight. Just by “including” your library (a single line of code) that blows up my program, I have an issue with my code. It works perfectly fine without including your lib. Hmmmm Sent with auto-corruption from my iPhoneOn Sep 5, 2022, at 17:40, Dr. Charles Bell @.***> wrote: Hi,

It appears you may have another library with the same name. Find the duplicates and disable/remove the one you do not need. Or, more correctly, change the #include to include the correct Ethernet class. Removing the one you do not need is easier, though.

Dr. Bell

On Sep 5, 2022, at 6:36 PM, burtamus2003 @.***> wrote:

I'm using the QNEthernet.h library on my Teensy 4.1 with Ethernet. As soon as I include the MySQL_Connection.h and compile it, it throws an error that 'Ethernet' is ambiguous. Any ideas would be appreciated.

myApp:312: error: reference to 'Ethernet' is ambiguous if (!Ethernet.begin()) { ^ In file included from C:\Users\me\Documents\Arduino\libraries\MySQL_Connector_Arduino\src/MySQL_Packet.h:44:0, from C:\Users\me\Documents\Arduino\libraries\MySQL_Connector_Arduino\src/MySQL_Connection.h:39, from C:\Users\me\Documents\Arduino\myApp\myApp.ino:17: C:\Users\me\Documents\Arduino\libraries\Ethernet\src/Ethernet.h:147:22: note: candidates are: EthernetClass Ethernet extern EthernetClass Ethernet; ^

— Reply to this email directly, view it on GitHub https://github.com/ChuckBell/MySQL_Connector_Arduino/issues/192, or unsubscribe https://github.com/notifications/unsubscribe-auth/AB6SHYARQ7QPXDEXKOVJQXLV4ZYWRANCNFSM6AAAAAAQFKCBKM. You are receiving this because you are subscribed to this thread.

—Reply to this email directly, view it on GitHub, or unsubscribe.You are receiving this because you authored the thread.Message ID: @.***> — Reply to this email directly, view it on GitHub, or unsubscribe. You are receiving this because you commented.