ZM Src Code Metrics allows you to calculate several code metrics: LOC, McCab and Halstead. This tool is developed in C ++ (tested on Windows and Linux) and whose aim is to support several programming languages. It generates a global report (project metrics) and detailed by file in the form of an XML file.
This version works very well, but some optimizations and functionalities must be added.