Windows vs Linux IDE/Libraries - Different behavior

I am collaborating with a friend on some IoT things we are making and I have discovered odd behavior differences between running the sketch on the Windows IDE vs my Linux IDE. I am wondering if I am doing something wrong, or is it just undocumented differences in the backend compiler?

For example, in my IDE (1.8.5) this code compiles just fine:

#include "HX711.h"  //You must have this library in your arduino library folder
 
#define DOUT  5 // GPIO5 = pin D1 on ESP8266
#define CLK  4  // GPIO4 = pin D2 on ESP8266
 
HX711 scale(DOUT, CLK);

But on his Windows IDE (also 1.8.5) he gets an error that it was not expecting any arguments. When I changed the code to this, it worked:

HX711 scale();

//......

scale.begin(DOUT, CLK);

We are using identical HX711.h and HX711.cpp library files (hence the double quotes instead of angle brackets).

Is Linux allowing me to use a “shortcut” that his Win10 version doesn’t like? Or am I using a non-standard shorthand in coding that I shouldn’t? Or is it just a quirk that we should work around?

Thanks for any tips or suggestions.

txNgineer: But on his Windows IDE (also 1.8.5) he gets an error that it was not expecting any arguments. When I changed the code to this, it worked:

HX711 scale();

//......

scale.begin(DOUT, CLK);

I find it hard to believe. In C++ HX711 scale(); is actually a function declaration, not a a declaration of a HX711 object (see Most vexing parse). There's no way scale.begin(DOUT, CLK); would compile after such declaration. There's something you are missing or not telling us.

txNgineer: We are using identical HX711.h and HX711.cpp library files (hence the double quotes instead of angle brackets).

This is also something I find hard to believe. The errors you are getting clearly indicate that you are using different declarations of HX711 class.

HX711 scale(DOUT, CLK);
HX711 scale();

are constructors

scale.begin(DOUT, CLK);

is a function call

the declarations in https://github.com/bogde/HX711/blob/master/src/HX711.h are

HX711();
void begin(byte dout, byte pd_sck, byte gain = 128);

there is no constructor with parameters

You probably have one HT711 library installed on the Windows machine and another HX711 library on the other. You’ll find that often there are multiple Arduino libraries with the same generic name, but completely different APIs.