We have a cyclic code $C$ of length $n$ on a finite field $\mathbb{F}_q$ and $g$ is the generating polynomial of $C$. We define another code $\bar{C}=\{c\in C\mid\sum\limits_{i=0}^{n-1} c_i=0 \}$. We identify a word $c$ with his polynomial $c(x)=c_0+...+c_{n-1}x^{n-1}$.
We want to find a generating polynomial for $\bar{C}$ using $g$.
First I prove that $\bar{C}$ is a cyclic code. Let $(c_0,...,c_{n-1})\in \bar{C}$. Using the fact that $C$ is cyclic we have $(c_{n-1},c_0,...,c_{n-2})\in C$ and the sum is $0$ because we keep the same coefficient (just the order has changed). So $(c_{n-1},c_0,...,c_{n-2})\in \bar{C}$.
By the identification of $c$ to $c(x)$ we notice that if $c\in \bar{C}$ then $c(1)=0$ and $g$ must divide $c$ by definition of $g$. Which means that $(x-1)$ and $g$ divide $c$.
So if we have $\gcd{(x-1,g)}=1$ we take $(x-1)g$ as the generating polynomial of $\bar{C}$. But for the other case I meet difficulties.
Thanks in advance !