Support #1059
Tracker branch build breaks if lcov is switched on
100%
Description
When setting the lcov flag to 1 in the tracker devel branch, and otherwise fine build will break with the attached error message. Could someone give me a clue on how to debug? Thanks.
Files
Updated by Rogers, Chris over 11 years ago
Should be in namespace MAUS... in fact all of the tracker code should be in namespace MAUS
Updated by Rogers, Chris over 11 years ago
It's probably something like lcov seeks to link to all declared functions to do coverage - but there is a function Kalman::A which is not defined somewhere. lcov can't link to that because the declaration doesn't exist. So first time you try to use libMausCpp.so, in this case in optics exe, you get a problem.
Updated by Dobbs, Adam over 11 years ago
- Status changed from Open to Closed
- % Done changed from 0 to 100
All roads lead to Rome. Thanks Chris, that was what I needed to know. Am spending most of my time on trying to resolve the namespace issue anyway. Will now close this.
Updated by Rogers, Chris over 11 years ago
I found out that KalmanTrack::A is a static const blah declared and defined in the header file. Should be declared in header and defined in .cc file. Why debug can't cope with this I don't know.
Edit to add - when I define the three variables in .cc file, build with debug goes fine... (trying to figure out #1060, hence playing)
Updated by Dobbs, Adam over 11 years ago
Thanks Chris. I'm a bit lost though. If something is static const, then it can't be changed right? So if I say:
static const double A;
in the header, then I can't then say
A = 2./(7.*0.427);
in the constructor in the .cc? What am I missing?
Updated by Santos, Edward over 11 years ago
Adam, check if the new revision gives you any trouble. (Removed the initialization from the header file.)
Updated by Rogers, Chris over 11 years ago
Yeah, declare in the .hh (i.e. static const double A;
) define in the .cc (i.e. static const double Kalman::A = 0.;
)