Welcome to MattzoBricks › Forums › MattzoTrainController for Bluetooth (MTC4BT) › Missing XmlParser.h
- This topic has 8 replies, 2 voices, and was last updated 3 years, 8 months ago by
Ray.
-
AuthorPosts
-
-
December 28, 2021 at 20:42 #4405
Ulrich Schneider
ParticipantWhen 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
Ray
KeymasterHi Ulrich,
Did you open the
MTC4BT-workspace.code-workspace
file from VS Code? And did you copy theplatformio.example.ini
file to aplatformio.ini
file?The
XmlParser.h
andXmlParser.cpp
files are in the\lib\MattzoBricks
folder. This folder is automatically included in the compilation by these lines from theplatformio.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 3 years, 9 months ago by
Ray.
-
This reply was modified 3 years, 9 months ago by
-
December 30, 2021 at 23:22 #4416
Ulrich Schneider
ParticipantYes, 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
Ray
KeymasterGlad 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 Schneider
ParticipantI 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 Schneider
ParticipantIt 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
Ray
KeymasterIn the
platformio.example.ini
file the folder..\lib
is included. That folder contains a subfolderMattzoBricks
, which contains the mentioned files. The path is relative to theplatformio.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?
-
January 16, 2022 at 00:33 #4821
Ulrich Schneider
ParticipantSorry 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
Ray
KeymasterActually 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!
-
-
AuthorPosts
- You must be logged in to reply to this topic.