- edited description
Missing string.h in testODB.cxx
Issue #18
resolved
A #include <string.h> is missing in libMidasInterface/tests/testODB.cxx leading to a error during compilation:
libMidasInterface/tests/testODB.cxx: In function ‘int main(int, char**)’:
libMidasInterface/tests/testODB.cxx:48:13: error: ‘strstr’ was not declared in this scope
else if (strstr(filename, &#34;.xml&#34;)!=0)
^~~~~~
libMidasInterface/tests/testODB.cxx:48:13: note: suggested alternative: ‘strtoq’
else if (strstr(filename, &#34;.xml&#34;)!=0)
^~~~~~
strtoq
libMidasInterface/tests/testODB.cxx:155:12: error: ‘strlen’ was not declared in this scope
len = strlen(s);
^~~~~~
libMidasInterface/tests/testODB.cxx:155:12: note: suggested alternative: ‘mbrlen’
len = strlen(s);
^~~~~~
mbrlen
make: *** [libMidasInterface/tests/testODB.o] Error 1
Solution: adding #include <string.h> at the beginning of that file solves the issue
Comments (6)
-
reporter -
reporter - edited description
-
reporter - edited description
-
I couldn’t reproduce the error, presumably because I am using a different compiler; but I committed suggested fix. Can you try and close bug if it works?
-
reporter It seems to be working with this fix, thank you.
I used gcc 7.3.1 in a DockerFile. If you are interested, I can send you the Dockerfile.
-
- changed status to resolved
Fix as suggested by Mathieu.
- Log in to comment