Welcome! Log In Create A New Profile

Advanced

Marlin doesnt compile after enabling delta_auto_calibration

Posted by jamesthegreat 
Marlin doesnt compile after enabling delta_auto_calibration
August 10, 2018 04:07PM
I am trying to enable delta autocalibration but it gives me an error in marlin_main.cpp around line 5678. I am running the latest marlin 1.1.9 freshly downloaded. This is the error:

sketch/Marlin_main.cpp:5678: undefined reference tolcd_probe_pt(float const&, float const&)'


This is the marlin_main.cpp line that causes the error:

float z_shift = lcd_probe_pt(0, 0) - center;


The error says lcd_probe_pt is undefined but it is defined a little before, here
float lcd_probe_pt(const float &rx, const float &ry);

that variable is also called a few lines before the error and it seems to be ok. I am not fluent in C++ so I can't tell what the problem is but it seems like a simple typo from the developers to me.

Any insight on the error will be appreciated.

Edited 1 time(s). Last edit at 08/10/2018 04:16PM by jamesthegreat.
Re: Marlin doesnt compile after enabling delta_auto_calibration
August 13, 2018 08:04AM
I searched through my older version of the Marlin FW and could not find the keyword.

float lcd_probe_pt(const float &rx, const float &ry);

The code above is the declaration of a function "lcd_probe_pt", not the implementation of it. It only tells the compiler that there is such a function and that the body is elsewhere in the code.
I suspect that the error happens during linking? If that is the case the body of the function could not be found.

If this is the case it may be that the body is in some #define somewhere (or some other condition) and is not being used during compilation. That is, the compiler is told to ignore some code, usually in 'blocks' (in these brackets {}).
If you search for the words "lcd_probe_pt" how many hits do you get?

If you get a hit where there is an implementation of the function, something like:
float lcd_probe_pt (const float &rx, const float &ry)
{
    //Function body here
}

try and see if/why that code is not being executed.

Hope this is of any help.

Edited 1 time(s). Last edit at 08/13/2018 08:05AM by v1talogy.
Sorry, only registered users may post in this forum.

Click here to login