Third-party library


#1

I want to include “src/HX711.h” into mblock 5.

I followed this documentation, but I couldn’t succeed.
this => https://www.mblock.cc/doc/en/developer-documentation/tutorials/create-arduino-ext-add-third-party-library.html
What’s the problem?

I used mac(OS Big Sur), and mblock 5.3.0.


Extensiones Arduino con más de una librería
#2

Hi sthgood, can you copy the whole error message to us? It would be helpful to locate the problem. For now we can only see part of it in the last screenshot


#3

I downloaded .mext and used it then, uploaded into arduino.
While uploading, I received this message.

start processing code…

processing code by middleware of pinMode

avr-toolchain/bin/avr-g++ -c -g -Os -w -std=gnu++11 -fno-exceptions -ffunction-sections -fdata-sections -fno-threadsafe-statics -MMD -mmcu=atmega328p -DF_CPU=16000000L -DARDUINO=10605 -DARDUINO_AVR_UNO -DARDUINO_ARCH_AVR -I"/Applications/Makeblock/mBlock.app/Contents/Resources/app/mlink-v1/external/arduino/avr-library/variants/standard" -I"avr-library/cores/arduino" -I"arduino-libraries/makeblock/src" -I"arduino-libraries/makeblock/src/utility/avr" -I"avr-library/libraries/Wire/src/utility" -I"avr-library/libraries/Wire/src/" -I"avr-library/libraries/EEPROM/src/" -I"avr-library/libraries/SPI/src/" -I"avr-library/libraries/SoftwareSerial/src/" -I"arduino-libraries/arduino/WiFi/src/" -I"arduino-libraries/arduino/SD/src/" -I"arduino-libraries/arduino/Bridge/src/" -I"arduino-libraries/arduino/Temboo/src/" -I"arduino-libraries/arduino/Servo/src/" -I"arduino-libraries/arduino/Ethernet/src/" -I"arduino-libraries/arduino/TFT/src/" -I"arduino-libraries/arduino/SpacebrewYun/src/" -I"arduino-libraries/arduino/LiquidCrystal/src/" -I"arduino-libraries/arduino/GSM/src/" -I"arduino-libraries/arduino/Adafruit_Circuit_Playground/" -I"arduino-libraries/arduino/Adafruit_Circuit_Playground/utility/" -I"arduino-libraries/arduino/Esplora/src/" -I"arduino-libraries/arduino/Firmata/" -I"arduino-libraries/arduino/Firmata/utility/" -I"arduino-libraries/arduino/Keyboard/src/" -I"arduino-libraries/arduino/Mouse/src/" -I"arduino-libraries/arduino/Robot_Control/src/" -I"arduino-libraries/arduino/Robot_Motor/src/" -I"arduino-libraries/arduino/RobotIRremote/src/" -I"arduino-libraries/arduino/Stepper/src/" “/Users/newmac/mblock-avr/temp/build/src/HX711.cpp” -o “/Users/newmac/mblock-avr/temp/build/src/HX711.o”

Command failed: avr-toolchain/bin/avr-g++ -c -g -Os -w -std=gnu++11 -fno-exceptions -ffunction-sections -fdata-sections -fno-threadsafe-statics -MMD -mmcu=atmega328p -DF_CPU=16000000L -DARDUINO=10605 -DARDUINO_AVR_UNO -DARDUINO_ARCH_AVR -I"/Applications/Makeblock/mBlock.app/Contents/Resources/app/mlink-v1/external/arduino/avr-library/variants/standard" -I"avr-library/cores/arduino" -I"arduino-libraries/makeblock/src" -I"arduino-libraries/makeblock/src/utility/avr" -I"avr-library/libraries/Wire/src/utility" -I"avr-library/libraries/Wire/src/" -I"avr-library/libraries/EEPROM/src/" -I"avr-library/libraries/SPI/src/" -I"avr-library/libraries/SoftwareSerial/src/" -I"arduino-libraries/arduino/WiFi/src/" -I"arduino-libraries/arduino/SD/src/" -I"arduino-libraries/arduino/Bridge/src/" -I"arduino-libraries/arduino/Temboo/src/" -I"arduino-libraries/arduino/Servo/src/" -I"arduino-libraries/arduino/Ethernet/src/" -I"arduino-libraries/arduino/TFT/src/" -I"arduino-libraries/arduino/SpacebrewYun/src/" -I"arduino-libraries/arduino/LiquidCrystal/src/" -I"arduino-libraries/arduino/GSM/src/" -I"arduino-libraries/arduino/Adafruit_Circuit_Playground/" -I"arduino-libraries/arduino/Adafruit_Circuit_Playground/utility/" -I"arduino-libraries/arduino/Esplora/src/" -I"arduino-libraries/arduino/Firmata/" -I"arduino-libraries/arduino/Firmata/utility/" -I"arduino-libraries/arduino/Keyboard/src/" -I"arduino-libraries/arduino/Mouse/src/" -I"arduino-libraries/arduino/Robot_Control/src/" -I"arduino-libraries/arduino/Robot_Motor/src/" -I"arduino-libraries/arduino/RobotIRremote/src/" -I"arduino-libraries/arduino/Stepper/src/" “/Users/newmac/mblock-avr/temp/build/src/HX711.cpp” -o “/Users/newmac/mblock-avr/temp/build/src/HX711.o” /Users/newmac/mblock-avr/temp/build/src/HX711.cpp:11:10: fatal error: HX711.h: No such file or directory #include <HX711.h> ^~~~~~~~~ compilation terminated.

Failed to compile file src/HX711.cpp

arduino build failed.


Cannot add my extension TM1637
#4

Hi sthgood, please try to change #include <HX711.h> to #include “HX711.h” and see what happens


#5

Thank you for your help.

I did it. You can see upper picture, written “src/HX711.h”.

I think, you mean, do I have to change HX711.cpp?


#6

I made it. Thank you very very very much.

I changed <hx711.h> to “hx711.h” in hx711.cpp.
Then, everything is OK!


#7

Yes, glad to know that and you are welcome!