# Bibliography is not showing any entries [closed]

I currently have a problem using the bibliography in LaTeX. I add it using a .bib file, but it does not show any references. I also run LaTeX, run bibtex and then run latex twice again. I have cited it in the main text, but also used the \notice{*} just to be sure. Below I have a MWE which shows the problem.

This is the main file that is the master document:

\documentclass[10pt,a4paper]{report}
\usepackage [version=4] {mhchem}
\usepackage[left=2cm,right=2cm,top=2cm,bottom=2cm]{geometry}

\begin{document}
\noindent
\newpage
\tableofcontents

\newpage
\input{maintext.tex}

\nocite{*}
\bibliography{testbib}
\bibliographystyle{plain}

\end{document}


This the .bib file:

@book{Hesp, author = "J. P. Hespanha", title = "Linear Systems Theory", publisher = "Princeton", year = "2009", }

And this is the text file that is use as an input

\chapter{main}
this is the main text \cite{Hesp}


## closed as off-topic by user31729, user13907, Thorsten, barbara beeton, Romain PicotMar 25 '16 at 13:48

• This question does not fall within the scope of TeX, LaTeX or related typesetting systems as defined in the help center.
If this question can be reworded to fit the rules in the help center, please edit the question.

• Welcome to TeX.SX! Your example works for me! Apparently something different goes wrong. Do you have a generated .bbl file in your working directory? – user31729 Mar 25 '16 at 9:44
• Hi Cristian, I did have one for the real document though. But apparently something goes wrong with the building then I guess? Because for this example there is no .bbl file created. I used the second option in the quick build menu (Pdflatex + bibtex + pdflatex (2x) + vie pdf) – Laura329 Mar 25 '16 at 9:57
• Laura329, I don't use such editors with quick build menu. I compile by hand always. – user31729 Mar 25 '16 at 10:07
• Christian, I did it by hand now, and when I compile BibTex, it tells me it can't open the test_main.aux file. That's my main document. – Laura329 Mar 25 '16 at 10:11
• I'm voting to close this question as off-topic because the cause of the problems were commented parts/commands in the O.P.'s document -- the problem is solved by tracking in the comments to the question. – user31729 Mar 25 '16 at 12:07