I wrote a C++ code, which will create a LaTeX file with Tikz commands. The tex file the code creates is pretty long i.e. around 43,000 lines. However, when I try to compile it gives me the following error.
! TeX capacity exceeded, sorry [main memory size=3000000].
Is there anyway I can circumvent this error?