Welcome to MattzoBricks › Forums › MattzoTrainController for Bluetooth (MTC4BT) › Missing XmlParser.h
- This topic has 8 replies, 2 voices, and was last updated 3 years, 9 months ago by
Ray.
-
AuthorPosts
-
-
December 28, 2021 at 20:42 #4405
Ulrich SchneiderParticipantWhen 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 directoryI am compiling on a Linux machine and I am new to VS Code. I might miss some important packages.
-
December 30, 2021 at 20:31 #4413
RayKeymasterHi Ulrich,
Did you open the
MTC4BT-workspace.code-workspacefile from VS Code? And did you copy theplatformio.example.inifile to aplatformio.inifile?The
XmlParser.handXmlParser.cppfiles are in the\lib\MattzoBricksfolder. This folder is automatically included in the compilation by these lines from theplatformio.inifile:***
lib_extra_dirs =
..\lib
***If you’ve created the
platformio.inifile and have opened the mentioned workspace file in VS Code, then you should be good to go.Cheers,
Ray-
This reply was modified 3 years, 10 months ago by
Ray.
-
This reply was modified 3 years, 10 months ago by
-
December 30, 2021 at 23:22 #4416
Ulrich SchneiderParticipantYes, 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. -
January 6, 2022 at 09:36 #4646
RayKeymasterGlad to hear you found a solution, but have you figured out at which location the XmlParser files needed to be placed?
-
January 6, 2022 at 12:27 #4656
Ulrich SchneiderParticipantI 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.
-
January 7, 2022 at 23:41 #4679
Ulrich SchneiderParticipantIt 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.
-
January 11, 2022 at 08:51 #4696
RayKeymasterIn the
platformio.example.inifile the folder..\libis included. That folder contains a subfolderMattzoBricks, which contains the mentioned files. The path is relative to theplatformio.inifile, so that would point to the\libfolder 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 = ..\libWould you mind sharing your platformio.ini, leaving out any sensitive stuff?
-
January 16, 2022 at 00:33 #4821
Ulrich SchneiderParticipantSorry 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.
-
-
January 16, 2022 at 13:12 #4824
RayKeymasterActually 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.inifile we distribute. Thanks Ulrich!
-
-
AuthorPosts
- You must be logged in to reply to this topic.
