HX711 library issues and updating the test code - undefined reference error

I've been following this tutorial on how to calibrate the HX711: https://www.brainy-bits.com/load-cell-and-hx711-with-arduino/

However, the HX711.h libraries have been updated hence the test script is having issues.
I have worked through the errors line by line however I cannot get past this error:

Arduino: 1.8.11 (Mac OS X), Board: "Arduino Uno"
the .h and .cpp files are included in the same folder. I have also attached all source codes.
The error doesn't make sense. I have tried moving the defining outside the loop but nope

error is:
undefined reference to `get_units()'

the modified code:

/* Calibration sketch for HX711 */
 
#include "HX711.h"  // Library needed to communicate with HX711 https://github.com/bogde/HX711
//#include "HX711.cpp"  
#define DOUT  5  // Arduino pin 6 connect to HX711 DOUT
#define CLK  4  //  Arduino pin 5 connect to HX711 CLK
 
HX711 scale();  // Init of library

void setup() {
  Serial.begin(9600);
  //scale.begin(DOUT,CLK);
void set_scale();  // Start scale
 void tare();       // Reset scale to zero

}
 
void loop() {
float  get_units();
float current_weight;
 current_weight=get_units();  
  
  float scale_factor=(current_weight/0.145);  // divide the result by a known weight
  Serial.println(scale_factor);  // Print the scale factor to use
}

caliberation_sketch_for_HX711.ino (695 Bytes)

HX711.cpp (7.01 KB)

HX711.h (2.76 KB)

The code will never work as written. You're not calling the functions of the class correctly. You have to make those calls using the name of the object you instantiated --- i.e. current_weight = scale.scale.get_units();

Trash what you have and work the examples that come with the library.

the examples that come with the tutorial and library do not work. Because the libraries were updated. class scale no longer exists. I managed to bypass the error by doing

float get_units(20);
float current_weight;
 current_weight=get_units;