[Tex/LaTex] Command \iint already defined, but i am not using the wasysym package

errorsincompatibility

I have the same problem as this question: I get the error \iint is already defined but I am not using the wasysym package. Here is my preamble

\usepackage{amsfonts}
\usepackage{amssymb}
\usepackage{mathabx}
\usepackage{mathrsfs}
\usepackage{amsmath}
\usepackage{amsthm}

\usepackage[english]{babel}

Best Answer

The error message is not related to the wasysym package directly. Instead, it is generated whenever the amssymb package is loaded after, rather than before, some other package, or packages, which also define macros such as \iint.

What's the solution? Simply load amssymb before, not after, mathabx.

In fact, it's usually a good idea to load all AMS packages before other packages that provide math-related facilities. E.g.,

\usepackage{amsmath,amssymb,amsthm}
\usepackage{mathabx,mathrsfs}

Note that the amssymb package loads the amsfonts package automatically. Hence, no need to load amsfonts explicitly.