Compilation error: exit status 1

Hi guys, i've installed the library and tried to compile the exsisting program and hence this error comming out.

C:\Users\Hg\Documents\Arduino\libraries\MFRC522\src\MFRC522Extended.cpp: In member function 'MFRC522::StatusCode MFRC522Extended::TCL_Transceive(TagInfo*, byte*, byte, byte*, byte*)':
C:\Users\Hg\Documents\Arduino\libraries\MFRC522\src\MFRC522Extended.cpp:824:34: error: ordered comparison of pointer with integer zero ('byte*' {aka 'unsigned char*'} and 'int')
824 | if (backData && (backLen > 0)) {
| ~~~~~~^
C:\Users\Hg\Documents\Arduino\libraries\MFRC522\src\MFRC522Extended.cpp:847:42: error: ordered comparison of pointer with integer zero ('byte*' {aka 'unsigned char*'} and 'int')
847 | if (backData && (backLen > 0)) {
| ~~~~~~^

exit status 1

Compilation error: exit status 1

As i have tried the clean install for the compiller, and reintall the library, is there any other method to solve this issue?

The library i've install as followed: MFRC522 by GithubCommunity version 1.4.10
The controller board is : ESP32 DOIT ESP32 DEVKIT D1

it is yet another problem with ESP32 core V3.x
you need to edit one of the MFRC522 library files

// in file Documents\Arduino\libraries\MFRC522\src\MFRC522Extended.cpp
// Line: 824 and 847
//    replace: if (backData && (backLen > 0))
//    by : if (backData && backLen != nullptr)

EDIT: or you could try rfid_mfrc522v2 library

or giving a rollback to ESP32-core-version 2.0.17 a try.
de-installing ESP32-core 3.X and installing ESP32-core version 2.0.17
which might be easier than fiddling around in the libraries source-code.

Thank you, this works

This topic was automatically closed 180 days after the last reply. New replies are no longer allowed.