# Problem with moderncv or TexStudio: makelettertitle is undefined

I'm about to send off my application, one last edit and ... TeXstudio complains about an error in the code:

Undefined control sequence \makelettertitle

This is really strange since a few days ago, everything worked fine. I browsed the forum and found similar problems, especially this one: There is no line here to end \makelettertitle error in moderncv

Apparently the control sequence is very sensitive with regard to the definition of a recipient. But as you can see, I've got a recipient. Here's my code:

\documentclass[11pt,a4paper,sans]{moderncv}

% moderncv themes
\moderncvstyle{classic}
\moderncvcolor{blue}
\nopagenumbers{}
\usepackage[utf8]{inputenc}
\usepackage[english]{babel}
\usepackage[scale=0.75]{geometry}
\usepackage{pdfpages}

% personal data
\name{Lars}{Klein}

\phone[mobile]{***}
\phone[fixed]{***}
\email{***}

\begin{document}

\date{\today}
\closing{Sincerely, \vspace{0,3cm}  \vspace{-1,0cm}}
\enclosure[Appendices]{CV, Performance Record, Proof of Enrollment}
\makelettertitle

% application text, personal

\makeletterclosing

\pagebreak

% #################################
% Lebenslauf......................

\makecvtitle

% cventries and cvitems, personal stuff

\includepdf[pages=1]{rwth-leistungen.pdf}
\includepdf[pages=1]{enrollment.pdf}

\clearpage

\end{document}


A few days ago, on the same machine, in the same editor this code compiled just fine. I'm sure that I haven't changed anything. The curious part is: It still compiles (with the error message) and doesn't list Bayer as the recipient, just the address "recipient address". This indicates to me, that something is wrong with my recipient setup and \makelettertitle has the same problem as in the linked question: empty recipient. But no matter what I enter as the recipient, the problem persists.

Something else: If I enter this code into the online editor ShareLatex, it compiles without any problems. The exact code pasted in this question, copied one-to-one into ShareLatex and my local TexStudio fails locally, compiles fine online. This could mean that my TexStudio installation is somehow broken. I'm using TexLive as a distro on Windows 10 64bit.

UPDATE:

since I'm tracking all my work-related documents with git, I could just revert to the state of a few days ago. Luckily the repository also contains the pdf (no criticism please, I know I'm not supposed to commit binaries). Now I can see the exact state of my tex file and the pdf that was created. The pdf contains the recipient name "Bayer" and "Leverkusen" as address. That's correct. If I open up the tex file in TexStudio the compiler error persists. The pdf is overwritten and the recipient name vanishes: No more "Bayer" in the pdf.

Apparently I broke my local latex in a very strange way. I didn't install any updates and the project is really absolutely unchanged, thanks to git.

And by now I've also tried TexMaker, same problem.

UPDATE

I removed the pdf references and compiled again, same error. The complete log output is on pastebin: http://pastebin.com/xHhmfaty

Currently I'm installing TexLive again, just to be sure. The installation takes ages. I'm surprised that TexStudio could invoke latex at all. After the installation finishes, I'll update the logs.

• it shouldn't depend on the editor. It would help, if you gave the complete error message (in TeXstudio, click on that "Log" button in the bottom panel). If I uncomment the two included PDF files, it compiles with just warnings and the Bayer AG above the address (using TeXstudio and a rather old TeX Live) – riddleculous Apr 15 '16 at 11:10
• You're right, it doesn't depend on the editor (locally) TexMaker has the same problem. I'm reinstalling TexLive. Nevertheless I could start the compilation process - with the same error messages. Rather surprised that it found latex even while installing. The logs are on pastebin. Once the installation is complete I'll update them – lhk Apr 15 '16 at 11:24