padsley / k600analyser

Code for the K600 analyser including plugin codes for silicon, clover and HAGAR data
1 stars 4 forks source link

Compilation failure on laptop #49

Closed padsley closed 9 years ago

padsley commented 9 years ago

Trying to compile the same code on my laptop (Ubuntu 12.04) as I have running on my desktop (SL 6.6), I get an error on the former but not on the latter.

MMM.c: In function ‘bool MMMFrontBackTest(int, int, double, double, SiliconData_)’: MMM.c:248:15: error: ‘abs’ was not declared in this scope if(abs(diff)<3_sigma) ^

I'm assuming that this is an error in libraries or something like that. Going to try to either get the 'abs' function working or alternatively just use a quick work-around (which requires a couple of extra operations but since this isn't the limit on the speed of the sort code, I don't mind too much).

padsley commented 9 years ago

Eeeee feck. I needed to include a header file that I'd forgotten. Now present.

include

and

std::abs

fixed it.