Johny white Posted September 30, 2021 Report Share Posted September 30, 2021 (edited) Got an open xenium board which I wanted to add LCD with when installing, already ordered daughter board for spi2par2019 and on its way through UPS. While waiting for this, I thought I'd compile and upload spi2par2019.ino to the Arduino Pro Micro Leonardo board I got but getting the following error towards the end of the compilation. C:\Users\amr\AppData\Local\Temp\cc9DUfI4.ltrans0.ltrans.o: In function `readSMBus(unsigned char, unsigned char, char*, unsigned char)': C:\Users\amr\Downloads\spi2par2019/spi2par2019.ino:474: undefined reference to `Wire' C:\Users\amr\Downloads\spi2par2019/spi2par2019.ino:474: undefined reference to `Wire' C:\Users\amr\Downloads\spi2par2019/spi2par2019.ino:474: undefined reference to `TwoWire::beginTransmission(unsigned char)' C:\Users\amr\Downloads\spi2par2019/spi2par2019.ino:475: undefined reference to `Wire' C:\Users\amr\Downloads\spi2par2019/spi2par2019.ino:475: undefined reference to `Wire' C:\Users\amr\Downloads\spi2par2019/spi2par2019.ino:475: undefined reference to `TwoWire::write(unsigned char)' C:\Users\amr\Downloads\spi2par2019/spi2par2019.ino:476: undefined reference to `Wire' C:\Users\amr\Downloads\spi2par2019/spi2par2019.ino:476: undefined reference to `Wire' C:\Users\amr\Downloads\spi2par2019/spi2par2019.ino:476: undefined reference to `TwoWire::endTransmission(unsigned char)' C:\Users\amr\Downloads\spi2par2019/spi2par2019.ino:477: undefined reference to `Wire' C:\Users\amr\Downloads\spi2par2019/spi2par2019.ino:477: undefined reference to `Wire' C:\Users\amr\Downloads\spi2par2019/spi2par2019.ino:477: undefined reference to `TwoWire::requestFrom(unsigned char, unsigned char)' C:\Users\amr\Downloads\spi2par2019/spi2par2019.ino:479: undefined reference to `Wire' C:\Users\amr\Downloads\spi2par2019/spi2par2019.ino:479: undefined reference to `Wire' C:\Users\amr\Downloads\spi2par2019/spi2par2019.ino:479: undefined reference to `TwoWire::read()' C:\Users\amr\Downloads\spi2par2019/spi2par2019.ino:479: undefined reference to `Wire' C:\Users\amr\Downloads\spi2par2019/spi2par2019.ino:479: undefined reference to `Wire' C:\Users\amr\Downloads\spi2par2019/spi2par2019.ino:479: undefined reference to `TwoWire::read()' C:\Users\amr\AppData\Local\Temp\cc9DUfI4.ltrans0.ltrans.o: In function `setup': C:\Users\amr\Downloads\spi2par2019/spi2par2019.ino:94: undefined reference to `Wire' C:\Users\amr\Downloads\spi2par2019/spi2par2019.ino:94: undefined reference to `Wire' C:\Users\amr\Downloads\spi2par2019/spi2par2019.ino:94: undefined reference to `TwoWire::begin(int)' collect2.exe: error: ld returned 1 exit status exit status 1 Error compiling for board Arduino Leonardo. Edited September 30, 2021 by Johny white Quote Link to comment Share on other sites More sharing options...
KaosEngineer Posted October 1, 2021 Report Share Posted October 1, 2021 4 hours ago, Johny white said: Got an open xenium board which I wanted to add LCD with when installing, already ordered daughter board for spi2par2019 and on its way through UPS. While waiting for this, I thought I'd compile and upload spi2par2019.ino to the Arduino Pro Micro Leonardo board I got but getting the following error towards the end of the compilation. C:\Users\amr\AppData\Local\Temp\cc9DUfI4.ltrans0.ltrans.o: In function `readSMBus(unsigned char, unsigned char, char*, unsigned char)': C:\Users\amr\Downloads\spi2par2019/spi2par2019.ino:474: undefined reference to `Wire' C:\Users\amr\Downloads\spi2par2019/spi2par2019.ino:474: undefined reference to `Wire' C:\Users\amr\Downloads\spi2par2019/spi2par2019.ino:474: undefined reference to `TwoWire::beginTransmission(unsigned char)' C:\Users\amr\Downloads\spi2par2019/spi2par2019.ino:475: undefined reference to `Wire' C:\Users\amr\Downloads\spi2par2019/spi2par2019.ino:475: undefined reference to `Wire' C:\Users\amr\Downloads\spi2par2019/spi2par2019.ino:475: undefined reference to `TwoWire::write(unsigned char)' C:\Users\amr\Downloads\spi2par2019/spi2par2019.ino:476: undefined reference to `Wire' C:\Users\amr\Downloads\spi2par2019/spi2par2019.ino:476: undefined reference to `Wire' C:\Users\amr\Downloads\spi2par2019/spi2par2019.ino:476: undefined reference to `TwoWire::endTransmission(unsigned char)' C:\Users\amr\Downloads\spi2par2019/spi2par2019.ino:477: undefined reference to `Wire' C:\Users\amr\Downloads\spi2par2019/spi2par2019.ino:477: undefined reference to `Wire' C:\Users\amr\Downloads\spi2par2019/spi2par2019.ino:477: undefined reference to `TwoWire::requestFrom(unsigned char, unsigned char)' C:\Users\amr\Downloads\spi2par2019/spi2par2019.ino:479: undefined reference to `Wire' C:\Users\amr\Downloads\spi2par2019/spi2par2019.ino:479: undefined reference to `Wire' C:\Users\amr\Downloads\spi2par2019/spi2par2019.ino:479: undefined reference to `TwoWire::read()' C:\Users\amr\Downloads\spi2par2019/spi2par2019.ino:479: undefined reference to `Wire' C:\Users\amr\Downloads\spi2par2019/spi2par2019.ino:479: undefined reference to `Wire' C:\Users\amr\Downloads\spi2par2019/spi2par2019.ino:479: undefined reference to `TwoWire::read()' C:\Users\amr\AppData\Local\Temp\cc9DUfI4.ltrans0.ltrans.o: In function `setup': C:\Users\amr\Downloads\spi2par2019/spi2par2019.ino:94: undefined reference to `Wire' C:\Users\amr\Downloads\spi2par2019/spi2par2019.ino:94: undefined reference to `Wire' C:\Users\amr\Downloads\spi2par2019/spi2par2019.ino:94: undefined reference to `TwoWire::begin(int)' collect2.exe: error: ld returned 1 exit status exit status 1 Error compiling for board Arduino Leonardo. Do you have the src subfolder with all its content from the spi2par2019 github repository in the sketch folder when trying to compile spi2par2019.ino? I believe that folder includes the code to use the Wire library. When I compiled spi2par2019, I received a few different errors than you but they did not prevent the sketch from compiling: C:\Users\KaosEngineer\Documents\Arduino\spi2par2019\src\SMWire\utility\twi.c: In function '__vector_36': C:\Users\KaosEngineer\Documents\Arduino\spi2par2019\src\SMWire\utility\twi.c:541:1: warning: useless type name in empty declaration extern unsigned char ; ^~~~~~ Sketch uses 11188 bytes (39%) of program storage space. Maximum is 28672 bytes. Global variables use 1061 bytes (41%) of dynamic memory, leaving 1499 bytes for local variables. Maximum is 2560 bytes. All of the highlighted files and folders need to be present from the repository in the location you load the spi2par2019.ino file from: The src folder contains the code to use the Wire function(s). Quote Link to comment Share on other sites More sharing options...
Johny white Posted October 1, 2021 Author Report Share Posted October 1, 2021 7 hours ago, KaosEngineer said: Do you have the src subfolder with all its content from the spi2par2019 github repository in the sketch folder when trying to compile spi2par2019.ino? I believe that folder includes the code to use the Wire library. When I compiled spi2par2019, I received a few different errors than you but they did not prevent the sketch from compiling: C:\Users\KaosEngineer\Documents\Arduino\spi2par2019\src\SMWire\utility\twi.c: In function '__vector_36': C:\Users\KaosEngineer\Documents\Arduino\spi2par2019\src\SMWire\utility\twi.c:541:1: warning: useless type name in empty declaration extern unsigned char ; ^~~~~~ Sketch uses 11188 bytes (39%) of program storage space. Maximum is 28672 bytes. Global variables use 1061 bytes (41%) of dynamic memory, leaving 1499 bytes for local variables. Maximum is 2560 bytes. All of the highlighted files and folders need to be present from the repository in the location you load the spi2par2019.ino file from: The src folder contains the code to use the Wire function(s). May be I'm just been blind, is there a download link for the whole repositery? Everytime it gave me a different error, I copied the text of the missing file, pasted into note pad and created it but I cannot find a download for the whole files needed in one place!!! Quote Link to comment Share on other sites More sharing options...
SS_Dave Posted October 1, 2021 Report Share Posted October 1, 2021 5 minutes ago, Johny white said: May be I'm just been blind, is there a download link for the whole repositery? Everytime it gave me a different error, I copied the text of the missing file, pasted into note pad and created it but I cannot find a download for the whole files needed in one place!!! Click on the green box called code the you can download the whole lot as a zip file Cheers SS Dave Soft modding is like masturbating, It gets the job done but it's nothing like the real thing. 1 Quote Link to comment Share on other sites More sharing options...
KaosEngineer Posted October 1, 2021 Report Share Posted October 1, 2021 27 minutes ago, Johny white said: May be I'm just been blind, is there a download link for the whole repositery? Everytime it gave me a different error, I copied the text of the missing file, pasted into note pad and created it but I cannot find a download for the whole files needed in one place!!! Click the Code button to display the dropdown menu. Next, click on Download ZIP. This action will download all of the files in the spi2par2019 repository in a ZIP archive file for the selected branch. For this repository, there's only one branch - named master. The zip archive will be named <repository name>-<branch name>.zip -> spi2par2019-master.zip. Quote Link to comment Share on other sites More sharing options...
KaosEngineer Posted October 1, 2021 Report Share Posted October 1, 2021 24 minutes ago, SS_Dave said: Click on the green box called code the you can download the whole lot as a zip file Cheers SS Dave Soft modding is like masturbating, It gets the job done but it's nothing like the real thing. I see you beat me to it. I had not read your post before I replied. So, the answer is posted twice. Quote Link to comment Share on other sites More sharing options...
Johny white Posted October 1, 2021 Author Report Share Posted October 1, 2021 Thanks guys, downloaded this and ran it again, this time its giving me less and different errors but its saying its compiled. Is that good to go and upload or I'm still doing something wrong? Quote Link to comment Share on other sites More sharing options...
KaosEngineer Posted October 1, 2021 Report Share Posted October 1, 2021 43 minutes ago, Johny white said: Thanks guys, downloaded this and ran it again, this time its giving me less and different errors but its saying its compiled. Is that good to go and upload or I'm still doing something wrong? Those are the same warnings that I saw. I believe the code has been compiled and is ready to be uploaded to the Arduino Leonardo. Edit: I opened the Arduino IDE again and recompiled the code. This time those error lines did not appear. Weird... Quote Link to comment Share on other sites More sharing options...
Johny white Posted October 1, 2021 Author Report Share Posted October 1, 2021 16 minutes ago, KaosEngineer said: Those are the same warnings that I saw. I believe the code has been compiled and is ready to be uploaded to the Arduino Leonardo. Edit: I opened the Arduino IDE again and recompiled the code. This time those error lines did not appear. Weird... Very odd indeed, I moved the sketch folder up one level. Open and recompiled few times, at first it gave the same error but now it's not giving it anymore. Quote Link to comment Share on other sites More sharing options...
Recommended Posts
Join the conversation
You can post now and register later. If you have an account, sign in now to post with your account.