$C$ is a $q$-ary cyclic $[n,k]$-code, where $(n,q)=1$, with generator polynomial $g(X)$. Show that $(1,1,\cdots ,1)\in C \Leftrightarrow X-1 \nmid g(X)$.
I know what a generator polynomial is. I know that the cyclic code has dimension equal to $k$ so the $deg(g(X))=n-k$. So $g(X)=g_{0}+g_{1}x+\cdots+g_{n-k}x^{n-k}$, where $g_{n-k} \neq 0$ But I don't know how to use $(n,q)=1$ or how to start finding any solution.