I've never heard of "signed" C or C++ source code files. You can compute a checksum (CRC, MD5, SHA1, etc) of the file, or compiled library and/or executable, and publish that, so if the file(s) are changed, the checksum will not agree. This is a common practice, and I suppose it could be considered a sort of "signature".
Sorry i seem to have caused some confusion, i ment a c++ function that checks the compiled source code (exe, dll) for a signature, hope this helps to explain this better.
Yes, that makes more sense. No, I'm not aware of that, for Linux anyway. For Windows? Possibly. As I said in my previous post, most folks use some sort of checksum to validate a dll (shared library), executable, or installable package.