CV_EXPORTS is missing. This function name should renamed to 1) start with a small leter; 2) do not include word computer, since it's not a class. Probably, distanceToCenters will be better.