First of all, TeXMakerX is now TeXStudio. If you are still running TeXMakerX then it is advised that you upgrade to the latest version of TeXStudio.
minted uses Pygments of Python for the fancy coloring schemes. You need to invoke the -shell-escape option in order for LaTeX to allow Pygments to be used.
In TeXStudio, click on the following menu
Options > Configure TeXStudio > Commands
and change
pdflatex -synctex=1 -interaction=nonstopmode %.tex
into
pdflatex -synctex=1 -interaction=nonstopmode --shell-escape %.tex
Edit
As mentioned by tohecz in comment, it is better to make a separate command for this in TeXStudio for security reasons. You can do this by clicking
Options > Configure TeXStudio > Build
and in the User Commands box, click +Add button and add a name for your command in the first cell, say user:graphviz-pdflatex and the command txs:///pdflatex/[--shell-escape] in the second cell.

You can then see the command listed in the menu
Tools > User
Click on the command to run.
-shell-escapewas discussed but I can't seem to find it. – hpesoj626 Feb 22 '13 at 18:47Pygmentsis not installed. How can I install that in a virutalenv and have TeXStudio use it? I don't want to install it system-wide. – stefanbschneider May 19 '21 at 05:43-shell-escapeor--shell-escape? – stefanbschneider May 19 '21 at 07:38-shell-escapedo exactly? Why is it harmful to always include it in the PdfLatex command? For some reason, the custom command stopped working for me. It did work before. – stefanbschneider Jul 01 '21 at 07:37