mengyao/Complete-Striped-Smith-Waterman-Library

problem while running make

lfaino opened this issue · 1 comments

Dear Dev,
i get an error

luigi@VAIO:~/bin$ git clone https://github.com/mengyao/Complete-Striped-Smith-Waterman-Library.git && mv Complete-Striped-Smith-Waterman-Library SW && cd SW/src/ && make
Cloning into 'Complete-Striped-Smith-Waterman-Library'...
remote: Counting objects: 1530, done.
remote: Compressing objects: 100% (13/13), done.
remote: Total 1530 (delta 5), reused 5 (delta 2), pack-reused 1515
Receiving objects: 100% (1530/1530), 12.21 MiB | 1.21 MiB/s, done.
Resolving deltas: 100% (942/942), done.
Checking connectivity... done.
gcc -c -o ssw.o ssw.c -Wall -pipe -O2
gcc -o ssw_test ssw.o main.c -Wall -pipe -O2 -lm -lz
gcc -o example_c ssw.o example.c -Wall -pipe -O2 -lm -lz
g++ -c -o ssw_cpp.o ssw_cpp.cpp -Wall -pipe -O2
g++ -o example_cpp example.cpp ssw.o ssw_cpp.o -Wall -pipe -O2 -lm -lz
example.cpp: In function ‘int main()’:
example.cpp:25:41: error: ‘strlen’ was not declared in this scope
int32_t maskLen = strlen(query.c_str())/2;
^
make: *** [example_cpp] Error 1

I think that i found the error. The error is in a parenthesis in the following part of the code. can you please fix it?
here the code

int main() { const string ref = "CAGCCTTTCTGACCCGGAAATCAAAATAGGCACAACAAA"; const string query = "CTGAGCCGGTAAATC"; int32_t maskLen = **strlen(query.c_str())/2;** maskLen = maskLen < 15 ? 15 : maskLen; //const string ref = "CCGTTTATCGCA"; //const string query = "CCTTTTATCGCA";

thanks