<p style='text-indent:20px;'>Let <inline-formula><tex-math id="M1">\begin{document}$ {\mathbb F}_q $\end{document}</tex-math></inline-formula> be the finite field with <inline-formula><tex-math id="M2">\begin{document}$ q = p^m $\end{document}</tex-math></inline-formula> elements, where <inline-formula><tex-math id="M3">\begin{document}$ p $\end{document}</tex-math></inline-formula> is an odd prime and <inline-formula><tex-math id="M4">\begin{document}$ m $\end{document}</tex-math></inline-formula> is a positive integer. Let <inline-formula><tex-math id="M5">\begin{document}$ \operatorname{Tr}_m $\end{document}</tex-math></inline-formula> denote the trace function from <inline-formula><tex-math id="M6">\begin{document}$ {\mathbb F}_q $\end{document}</tex-math></inline-formula> onto <inline-formula><tex-math id="M7">\begin{document}$ {\mathbb F}_p $\end{document}</tex-math></inline-formula>, and the defining set <inline-formula><tex-math id="M8">\begin{document}$ D\subset {\mathbb F}_q^t $\end{document}</tex-math></inline-formula>, where <inline-formula><tex-math id="M9">\begin{document}$ t $\end{document}</tex-math></inline-formula> is a positive integer. In this paper, the set <inline-formula><tex-math id="M10">\begin{document}$ D = \{(x_1, x_2, \cdots, x_t)\in {\mathbb F}_q^t:\operatorname{Tr}_m(x_1^2+x_2^2+\cdots+x_t^2) = 0, \operatorname{Tr}_m(x_1+x_2+\cdots+x_t) = 1\} $\end{document}</tex-math></inline-formula>. Define the <inline-formula><tex-math id="M11">\begin{document}$ p $\end{document}</tex-math></inline-formula>-ary linear code <inline-formula><tex-math id="M12">\begin{document}$ {\mathcal C}_D $\end{document}</tex-math></inline-formula> by <p style='text-indent:20px;'><disp-formula> <label/> <tex-math id="FE1"> \begin{document}$ \begin{eqnarray*} {\mathcal C}_D = \{\textbf{c}(a_1, a_2, \cdots, a_t): (a_1, a_2, \cdots, a_t)\in {\mathbb F}_q^t\}, \end{eqnarray*} $\end{document} </tex-math></disp-formula> <p style='text-indent:20px;'>where <p style='text-indent:20px;'><disp-formula> <label/> <tex-math id="FE2"> \begin{document}$ \textbf{c}(a_1, a_2, \cdots, a_t) = (\operatorname{Tr}_m(a_1x_1+a_1x_2\cdots+a_tx_t))_{(x_1, \cdots, x_t)\in D}. $\end{document} </tex-math></disp-formula> <p style='text-indent:20px;'>We evaluate the complete weight enumerator of the linear codes <inline-formula><tex-math id="M13">\begin{document}$ {\mathcal C}_D $\end{document}</tex-math></inline-formula>, and present its weight distributions. Some examples are given to illustrate the results.