I am using mktypelib now, and the compiler errors are gone.
I have spent the last 14 days again and again with writing a tool that would convert my enums and udts to a tlb.
It has become a really nice code which is now able to point out any error that occurs by creating individual idls and seeing if they compile and if not, find out to which point it compiled fine, etc.

Once I finish it entirely with all culprit solved that I am still dealig with, I will post it here as it is really a handy tool.