Viewing 7 reply threads
  • Author
    Posts
    • #4405
      Ulrich SchneiderUlrich Schneider
      Participant

      When I am trying to build the project, I get an error:

      In file included from src/MTC4BTMQTTHandler.cpp:1:0:
      src/MTC4BTMQTTHandler.h:4:23: fatal error: XmlParser.h: No such file or directory

      I am compiling on a Linux machine and I am new to VS Code. I might miss some important packages.

    • #4413
      Raymond BrinkRay
      Keymaster

      Hi Ulrich,

      Did you open the MTC4BT-workspace.code-workspace file from VS Code? And did you copy the platformio.example.ini file to a platformio.ini file?

      The XmlParser.h and XmlParser.cpp files are in the \lib\MattzoBricks folder. This folder is automatically included in the compilation by these lines from the platformio.ini file:

      ***
      lib_extra_dirs =
      ..\lib
      ***

      If you’ve created the platformio.ini file and have opened the mentioned workspace file in VS Code, then you should be good to go.

      Cheers,
      Ray

      • This reply was modified 2 years, 3 months ago by Raymond BrinkRay.
    • #4416
      Ulrich SchneiderUlrich Schneider
      Participant

      Yes, I do have opened the correct file and renamed the platformio.ini file.
      I just copied the file from the firmware lib in several other folders and it worked.

    • #4646
      Raymond BrinkRay
      Keymaster

      Glad to hear you found a solution, but have you figured out at which location the XmlParser files needed to be placed?

    • #4656
      Ulrich SchneiderUlrich Schneider
      Participant

      I have copied it into three folders. Into the Arduino library folder, into the “MTC4BT/lib” folder, and into the “MTC4BT/lib/MController” folder. If I got time over the weekend, I might have a chance to look at which one is the right one.

    • #4679
      Ulrich SchneiderUlrich Schneider
      Participant

      It seems like the two files (XmlParser.h and XmlParser.cpp) should be in “/MTC4BT/lib/MCNetwork/” or “/MTC4BT/lib/MController/”. The other folders seem not to work for me.

    • #4696
      Raymond BrinkRay
      Keymaster

      In the platformio.example.ini file the folder ..\lib is included. That folder contains a subfolder MattzoBricks, which contains the mentioned files. The path is relative to the platformio.ini file, so that would point to the \lib folder in the root of the firmware zip-file. As far as I can tell and verify the location in the firmware zip-file and the path in the example platformio.ini file are fine.

      Do you have the right lib folder referenced in your platformio.ini file?
      lib_extra_dirs = ..\lib

      Would you mind sharing your platformio.ini, leaving out any sensitive stuff?

      • This reply was modified 2 years, 3 months ago by Raymond BrinkRay.
      • This reply was modified 2 years, 3 months ago by Raymond BrinkRay.
      • This reply was modified 2 years, 3 months ago by Raymond BrinkRay.
      • #4821
        Ulrich SchneiderUlrich Schneider
        Participant

        Sorry for the late reply. Error is on my side. As I am a Linux user, it needs to be “…/lib” in my case and not “..\lib”. Then it works as a charm. Sorry for the confusion.

    • #4824
      Raymond BrinkRay
      Keymaster

      Actually that’s a valid point. I known for Windows it doesn’t matter, so I’ll change the default lib folder path in the platformio.example.ini file we distribute. Thanks Ulrich!

Viewing 7 reply threads
  • You must be logged in to reply to this topic.