Im reading below document and trying do that:

But I dont know where to put below code:
pdflatex -shell-escape <tex file>
to active it. When I compiled only code inside this document, it showed me below error. Im using texlive to compile in windows.
\documentclass{article}
\usepackage{tikz}
\usetikzlibrary{external}
\tikzexternalize % activate!
\begin{document}
\begin{tikzpicture}
\node {root}
child {node {left}}
child {node {right}
child {node {child}}
child {node {child}}
};
\end{tikzpicture}
A simple image is \tikz \fill (0,0) circle(5pt) ;.
\end{document}

figuresand then runpdflatexas normal except with the addition of the-shell-escapecommand line parameter. – TH. Jun 18 '17 at 18:08\usetikzlibrary{external}and\tikzexternalizeat an appropriate place in the pre-amble. Note that if you want to put your figures into a subfolder, you have to create that folder by hand. – Huang_d Jun 18 '17 at 21:35:)– Fran Jun 19 '17 at 03:11