Would you like to react to this message? Create an account in a few clicks or log in to continue.

You are not connected. Please login or register

Multiple definition of function when using libraries

Go down  Message [Page 1 of 1]

Nuburgring



I want to use Adafruit_GFX library for my arduino project in simulide (im using M1 Mac).

This is my compiler path
Code:
/Users/szymon/Applications/Arduino.app/Contents/Java/

When I try to add new library via ArduinoIDE 1.8.19 Library Manager, it's not visible in simulide.
Code:

Adafruit_GFX.h: No such file or directory
 #include <Adafruit_GFX.h>

I think it is because new downloaded are stored here:
Code:
/Users/Documents/Arduino/libraries

My solution was to simply copy files from that path to
Code:
/Users/szymon/Applications/Arduino.app/Contents/Java/libraries
because it can be visible to simulide.

However, if i do that i get something like this:
Code:
....
....
....
(.text+0x0): multiple definition of `GFXcanvas16::drawFastRawHLine(int, int, int, unsigned int)'
/Users/szymon/Library/Application Support/simulide/codeeditor/buildIno/build/sketch/Adafruit_GFX.cpp.o (symbol from plugin):(.text+0x0): first defined here
/Users/szymon/Library/Application Support/simulide/codeeditor/buildIno/build/libraries/Adafruit_GFX_Library/Adafruit_GFX.cpp.o (symbol from plugin): In function `Adafruit_GFX::writeLine(int, int, int, int, unsigned int)':
(.text+0x0): multiple definition of `GFXcanvas16::drawFastVLine(int, int, int, unsigned int)'
/Users/szymon/Library/Application Support/simulide/codeeditor/buildIno/build/sketch/Adafruit_GFX.cpp.o (symbol from plugin):(.text+0x0): first defined here
/Users/szymon/Library/Application Support/simulide/codeeditor/buildIno/build/libraries/Adafruit_GFX_Library/Adafruit_GFX.cpp.o (symbol from plugin): In function `Adafruit_GFX::writeLine(int, int, int, int, unsigned int)':
(.text+0x0): multiple definition of `GFXcanvas16::drawFastHLine(int, int, int, unsigned int)'
/Users/szymon/Library/Application Support/simulide/codeeditor/buildIno/build/sketch/Adafruit_GFX.cpp.o (symbol from plugin):(.text+0x0): first defined here
collect2: error: ld returned 1 exit status
exit status 1

     SUCCESS!!! Compilation Ok
-------------------------------------------------------
Exec:
Found Build folders at:
/Users/szymon/Library/Application Support/simulide/codeeditor/buildIno

Success AND errors ????

It doesn't like the fact that they are in two places at once.

Code:

/Users/szymon/Library/Application Support/simulide/codeeditor/buildIno/build/libraries
Multiple definition of function when using libraries MQ0CnGm



Code:

/Users/szymon/Library/Application Support/simulide/codeeditor/buildIno/build/sketch

Multiple definition of function when using libraries YlRYS92

Back to top  Message [Page 1 of 1]

Permissions in this forum:
You cannot reply to topics in this forum