Syntax Highlighting in LaTeX with Minted

FYI, If you use Kile the way to set up the pdflatex flag is to go to Tools > Configure Kile > Tools > Build > PDFLaTeX and add ‘-shell-escape’ to the ‘Options:’ box.

Source: Syntax Highlighting in LaTeX with Minted