GCC g++ 'include nested too deeply error'
andrew k (267) 76 posts |
Hello, I’m trying again to get into some RISC OS development and have picked writing a simple XML parser of KML files as my learning project but I’m getting stuck pretty early on just trying to compile a basic app including tinyxml2. I’m using GCC g++ to compile but it’s throwing the error “include nested too deeply”I have uploaded the code I was trying to compile to Github and also put the full compile error output in there. Is this a limit with the GCC version support on on RISC OS? Do I need to pick another maybe more simple XML library to use? note: I’m trying to stick to using C++ as I have tried to get into C in the past but coming from C#/Java/JavaScript development I just enjoy working with OO like languages more. I have seen that Python 3 is now on RISC OS and there is a toolbox library so maybe that would also a good language for an existing developer but someone who is new to RISC OS development to use/learn. |
Theo Markettos (89) 919 posts |
Your tinyxml2.h #includes tinyxml2.h, so you end up in infinite recursion of #includes. Eventually GCC gets fed up. |
andrew k (267) 76 posts |
Thank you Theo, Yes looks like I copied the main tinyxml2.cpp file to the h directory by accident when moving the code to RPCEmu. I can get past the error above now so will try work through the new errors. |
James Pankhurst (8374) 100 posts |
That’s how it works, a successive set of errors that produce more errors once you fix them, until it finally compiles and you are suspicious of the result. |
andrew k (267) 76 posts |
I have got my initial test code to build and run. Doesn’t do much but it reads in a gpu xml file and spits out the longitude and latitude data but I want to create a little app to calculate distance from this data as a learning exercise. |