I'm trying to insert a small code listing into a tabu table, however I'm unable to build a PDF.
The code I'm trying to use (well- a simplified form of it) is as follows:
% !TEX encoding = UTF-8 Unicode
\documentclass[11pt]{article} % use larger type; default would be 10pt
\usepackage[utf8]{inputenc} % set input encoding (not needed with XeLaTeX)
%%% PAGE DIMENSIONS
\usepackage{geometry} % to change the page dimensions
\geometry{a4paper} % or letterpaper (US) or a5paper or....
%%% PACKAGES
\usepackage{listings} % code listings
\usepackage{tabu} % for tables
\begin{document}
\begin{tabu}{X|X}
\begin{lstlisting}
myFunction() {
do.Something();
}
\end{lstlisting}
& This does something
\end{tabu}
\end{document}
And here are the errors in the build log:
D:/mwe.tex:22: Forbidden control sequence found while scanning use of \lst@next. [\end{tabu}]
D:/mwe.tex:22: Missing } inserted. [\end{tabu}]
D:/mwe.tex:22: Missing \endgroup inserted. [\end{tabu}]
D:/mwe.tex:22: Missing \endgroup inserted. [\end{tabu}]
D:/mwe.tex:22: Missing \endgroup inserted. [\end{tabu}]
D:/mwe.tex:22: Missing } inserted. [\end{tabu}]
D:/mwe.tex:22: Forbidden control sequence found while scanning use of \lst@next. [\end{tabu}]
D:/mwe.tex:22: Missing } inserted. [\end{tabu}]
D:/mwe.tex:22: Missing \endgroup inserted. [\end{tabu}]
D:/mwe.tex:22: Missing \endgroup inserted. [\end{tabu}]
D:/mwe.tex:22: Missing \endgroup inserted. [\end{tabu}]
D:/mwe.tex:22: Missing } inserted. [\end{tabu}]
D:/mwe.tex:22: Missing $ inserted. [\end{tabu}]
D:/mwe.tex:22: Missing } inserted. [\end{tabu}]
D:/mwe.tex:22: Missing } inserted. [\end{tabu}]
D:/mwe.tex:22: Forbidden control sequence found while scanning use of \lst@next. [\end{tabu}]
D:/mwe.tex:22: Missing } inserted. [\end{tabu}]
D:/mwe.tex:22: Missing \endgroup inserted. [\end{tabu}]
D:/mwe.tex:22: Missing \endgroup inserted. [\end{tabu}]
D:/mwe.tex:22: Missing \endgroup inserted. [\end{tabu}]
D:/mwe.tex:22: Missing } inserted. [\end{tabu}]
When the listing is outside of the tabu environment, everything works as expected. Using a different table environment, such as tabular, produces the listing inside of a table.
Is there an issue with my Tex code? Does tabu not support code listings? Or have I missed something glaringly obvious? I've only been using LaTeX for a handful of days, so forgive me if that's the case!

\documentclass{}(\begin{document}and\end{document}) and the appropriate packages that illustrates the problem . While solving problems can be fun, setting them up is not. Then, those trying to help can simply cut and paste your MWE and get started on solving the problem, instead of spending time to first reproduce the problem. – skpblack Sep 30 '14 at 22:22tabu*when you have verbatim material. Also, I'd suggest you use\lstinline(otherwise I think you would have to use a\parbox). – Peter Grill Sep 30 '14 at 22:28tabu*ANDlstinlineworks, however limits me to single-line code listings. I'd like to have a multi-line snippet in the table - sorry if that wasn't clear. – user2583109 Sep 30 '14 at 22:32tabuit isn't necessary to loadarraypackage, becausetabuloadsarrayinternally. – skpblack Sep 30 '14 at 22:36verbatimboxpackage. – Steven B. Segletes Sep 30 '14 at 23:18