[op25-dev] fatal make error tripped by bch.h

This is merely a historical archive of years 2008-2021, before the migration to mailman3.

A maintained and still updated list archive can be found at https://lists.osmocom.org/hyperkitty/list/op25-dev@lists.osmocom.org/.

md123 at nycap.rr.com md123 at nycap.rr.com
Wed Aug 28 02:05:37 UTC 2013


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!

-------------- next part --------------
An HTML attachment was scrubbed...
URL: <http://lists.osmocom.org/pipermail/op25-dev/attachments/20130827/378a4e97/attachment.htm>


More information about the op25-dev mailing list