You are right in this forum...
I hope you are following the instructions at Compiling - Linux | Official OpenCPN Homepage
version.h gets generated during the "cmake .." configuration step
make sure not to run "make clean" which deletes it.
As a minimal test, you can try
in your build directory, which should result in a clean build. After that time will come to figure out why the build from Eclipse fails.