Repeatedly, we get on the forum questions related to programming the Epiphany/Parallella - "how to"-s and "not working"-s.
Please be aware that in order to provide effective answers, the questions should provide us with the means for reproducing the problem, and be simple enough so we don't waste time on trying to understand what you are trying to do. In short: SSCCE.
It is very important that if you send a code snippet, at least provide the compile command you used. The compiler options and linker script can make a big difference on the resulting executable.
Also, when building a host-device project, please include both programs.
Please have a look at the following references for general guidelines for submission of code-related questions: