JinfengChen / cdhit

Automatically exported from code.google.com/p/cdhit
GNU General Public License v2.0
0 stars 0 forks source link

Errors compiling cdhit-v4.2.1-2010-09-21 #1

Closed GoogleCodeExporter closed 9 years ago

GoogleCodeExporter commented 9 years ago
What steps will reproduce the problem?
1.unpack
2.make
3.

What is the expected output? What do you see instead?
I am able to compile v4.2 but v4.2.1 fails with the following error:

g++ -O2 -DNO_OPENMP cdhit-common.c++ -c
cdhit-common.c++: In member function ‘int WordTable::CountWords(int, 
Vector<int>&, Vector<unsigned int>&, NVector<unsigned int>&, NVector<unsigned 
int>&, NVector<unsigned int>&, NVector<unsigned char>&, bool)’:
cdhit-common.c++:1251: error: ‘CHAR_BIT’ was not declared in this scope
cdhit-common.c++: In member function ‘int WordTable::CountWords(int, 
Vector<int>&, Vector<unsigned int>&, NVector<IndexCount>&, NVector<unsigned 
int>&, NVector<unsigned int>&, NVector<unsigned int>&, NVector<unsigned int>&, 
bool, int)’:
cdhit-common.c++:1320: error: ‘CHAR_BIT’ was not declared in this scope
cdhit-common.c++: In member function ‘int WordTable::CountWords(int, 
Vector<int>&, Vector<unsigned int>&, NVector<IndexCount>&, 
NVector<IndexCount*>&, NVector<unsigned int>&, NVector<unsigned int>&, 
NVector<unsigned int>&, bool, int)’:
cdhit-common.c++:1376: error: ‘CHAR_BIT’ was not declared in this scope
make: *** [cdhit-common.o] Error 1

What version of the product are you using? On what operating system?
v4.2.1 on SUSE Linux Enterprise Server 10

Please provide any additional information below.

Original issue reported on code.google.com by karl.nor...@gmail.com on 28 Sep 2010 at 9:12

GoogleCodeExporter commented 9 years ago

Solution:

Please try to add:
#include <limits.h>
to the beginning of cdhit-common.c++. This should work, otherwise, just add:
#define CHAR_BIT 8

Original comment by weizhong...@gmail.com on 28 Sep 2010 at 4:17

GoogleCodeExporter commented 9 years ago
Thanks, I included limits.h and it worked!

Original comment by karl.nor...@gmail.com on 29 Sep 2010 at 9:00

GoogleCodeExporter commented 9 years ago

Original comment by phooli...@gmail.com on 5 Oct 2010 at 10:47