# How to solve problem with url and hyperref packages?

I have the following code:

\documentclass{article}

\usepackage{url}

\begin{document}

Fatal error: Call to undefined method stdClass::type() in \url{C:\wamp\www\mysite\sites\all\modules\userpoints\userpoints_rules.rules.inc}

\end{document}


It returns an error. However, when I comment the third line, there's no problem. Changing the order of the second and third line doesn't help. I need the hyperref package somewhere else in my document, so simply deleting the third line is not an option.

How can I solve this?

• All thos backslashes are treated as control sequences. Replace them with forward shlashes, don't worry, this works on windows. Also, use \path instead of \url – Johannes_B Dec 18 '13 at 14:26

url (which is loaded automatically by hyperref) provides a command called \path which you can use.
\documentclass{article}