fastp icon indicating copy to clipboard operation
fastp copied to clipboard

Compile error is src/read.cpp

Open svenmh opened this issue 4 years ago • 4 comments

On CentOS 7 I had to add:

#include <string.h>

to src/read.cpp to get it to compile. Here is what I got before adding that line:

g++ -c src/read.cpp -o obj/read.o -std=c++11 -pthread -g -O3 -I./inc  
src/read.cpp: In member function ‘void Read::appendToString(std::string*)’:
src/read.cpp:125:52: error: ‘memcpy’ was not declared in this scope
  memcpy(str + total, mName->data(), mName->length());
                                                    ^
src/read.cpp: In member function ‘void Read::appendToStringWithTag(std::string*, std::string)’:
src/read.cpp:151:52: error: ‘memcpy’ was not declared in this scope
  memcpy(str + total, mName->data(), mName->length());
                                                    ^
make: *** [Makefile:32: obj/read.o] Error 1

svenmh avatar Oct 21 '21 19:10 svenmh

@svenmh which version of g++ u r using?

KimBioInfoStudio avatar Nov 02 '21 22:11 KimBioInfoStudio

$ gcc --version gcc (GCC) 4.8.5 20150623 (Red Hat 4.8.5-44) Copyright (C) 2015 Free Software Foundation, Inc. This is free software; see the source for copying conditions. There is NO warranty; not even for MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE.

svenmh avatar Nov 04 '21 16:11 svenmh

@svenmh i think we have fix the issue on the latest branch could u try again?

KimBioInfoStudio avatar Nov 04 '21 18:11 KimBioInfoStudio

yes, it compiles now. Thank you.

svenmh avatar Nov 05 '21 13:11 svenmh