Arduino external library compiler error

Jeff_wu
Jeff_wu Altair Community Member
edited 2023 26 in Community Q&A

I am trying to use an external Arduino library to operate an LCD. It can display correctly under the compilation of the Arduino IDE, but it fails to compile in Embed. Can you tell me how to modify it?

Best Answer

  • Sreeram Mohan_20368
    Sreeram Mohan_20368
    Altair Employee
    edited 2023 26 Answer ✓

    Hi Robert, 

    Here is the core issue the Adaftuit GFX library depends on an internal class and set of methods in the Adafruit_SPITFT class. This was missing in your case in the diagram. With the inclusion of the cpp below you should now see no compile errors. Let me know if works on your end . I can only verify my compile works but do not have the board and the LCD to test. 

    --sreeram

     

     

    image

Answers

  • Sreeram Mohan_20368
    Sreeram Mohan_20368
    Altair Employee
    edited 2023 21

    Hi Robert , 

    Could you please provide details on the library in this case that you are trying to use and the version. I see there are different versions of the adafruit library and it is not clear to me. 

    Also could you please add the compile error log and post it ?

    --sreeram

  • Jeff_wu
    Jeff_wu Altair Community Member
    edited 2023 24

    Hi Robert , 

    Could you please provide details on the library in this case that you are trying to use and the version. I see there are different versions of the adafruit library and it is not clear to me. 

    Also could you please add the compile error log and post it ?

    --sreeram

    Library:

    1. Adafruit_BusIO-1.14.1;
    2. Adafruit_GFX_Library-1.11.5;
    3. Adafruit_ILI9341-1.5.12;

    Thank you!

  • Sreeram Mohan_20368
    Sreeram Mohan_20368
    Altair Employee
    edited 2023 26 Answer ✓

    Hi Robert, 

    Here is the core issue the Adaftuit GFX library depends on an internal class and set of methods in the Adafruit_SPITFT class. This was missing in your case in the diagram. With the inclusion of the cpp below you should now see no compile errors. Let me know if works on your end . I can only verify my compile works but do not have the board and the LCD to test. 

    --sreeram

     

     

    image

  • Jeff_wu
    Jeff_wu Altair Community Member
    edited 2023 26

    Hi Robert, 

    Here is the core issue the Adaftuit GFX library depends on an internal class and set of methods in the Adafruit_SPITFT class. This was missing in your case in the diagram. With the inclusion of the cpp below you should now see no compile errors. Let me know if works on your end . I can only verify my compile works but do not have the board and the LCD to test. 

    --sreeram

     

     

    image

    Hi Sreeram,

    The program is running properly and the LCD is displaying correctly. Thank you very much.