i tried building with './configure --enable-debug'
got the following errors:
bch.cc: In function 'int bchDec(bit_vector&)':
bch.cc:33:8: warning: variable 'root' set but not used
[-Wunused-but-set-variable]
bch.cc: At global scope:
bch.cc:170:29: error: redefinition of 'const int bchGFexp [64]'
bch.cc:8:18: error: 'const int bchGFexp [64]' previously defined here
bch.cc:177:29: error: redefinition of 'const int bchGFlog [64]'
bch.cc:15:18: error: 'const int bchGFlog [64]' previously defined here
bch.cc:184:25: error: redefinition of 'const int bchG [48]'
bch.cc:22:18: error: 'const int bchG [48]' previously defined here
bch.cc: In function 'int bchDec(bit_vector&)':
bch.cc:190:5: error: redefinition of 'int bchDec(bit_vector&)'
bch.cc:28:5: error: 'int bchDec(bit_vector&)' previously defined here
bch.cc: At global scope:
bch.cc:332:29: error: redefinition of 'const int bchGFexp [64]'
bch.cc:8:18: error: 'const int bchGFexp [64]' previously defined here
bch.cc:339:29: error: redefinition of 'const int bchGFlog [64]'
bch.cc:15:18: error: 'const int bchGFlog [64]' previously defined here
bch.cc:346:25: error: redefinition of 'const int bchG [48]'
bch.cc:22:18: error: 'const int bchG [48]' previously defined here
bch.cc: In function 'int bchDec(bit_vector&)':
bch.cc:352:5: error: redefinition of 'int bchDec(bit_vector&)'
bch.cc:28:5: error: 'int bchDec(bit_vector&)' previously defined here
make[4]: *** [bch.lo] Error 1
make[4]: Leaving directory `/home/matt/op25/blocks/src/lib'
make[3]: *** [all] Error 2
make[3]: Leaving directory `/home/matt/op25/blocks/src/lib'
make[2]: *** [all-recursive] Error 1
make[2]: Leaving directory `/home/matt/op25/blocks/src'
make[1]: *** [all-recursive] Error 1
make[1]: Leaving directory `/home/matt/op25/blocks'
make: *** [all] Error 2
indeed on inspection of the bch.h code i noticed some things. straightaway i saw that the
code was not surrounded with the standard:
#ifndef INCLUDED_BCH_H
#define INCLUDED_BCH_H
#endif
so i added this and the make error is gone. i am confused as to why the header file is so
spartan? no declarations?
Thanks!
This makes no sense - the message is saying there's an error on line 170 of the
file bch.cc. The file isn't that long.
right. well its not supposed to be. for some reason after trying to enable the debugger
the code in the .cc file was sort of copied and appended back into the file; four times
for me. so i surrounded the code in the .h file with the #ifndef statements, deleted the
duplicate code in the .cc file, and rebuilt receiving no more make errors.
This makes no sense - the message is saying there's an error on line 170 of the
file bch.cc. The file isn't that long.
right. well its not supposed to be. . . i surrounded the code in the .h file with the
#ifndef statements . . .
so does compiler need to see the code in bch.h more than once for some reason? (i cannot
run the program at this time)
Thanks!