You signed in with another tab or window. Reload to refresh your session.You signed out in another tab or window. Reload to refresh your session.You switched accounts on another tab or window. Reload to refresh your session.Dismiss alert
While installing the sar_tools I get that
dateconv.cc: In function ‘int main(int, char**)’:
error: invalid conversion from ‘char*’ to ‘size_t’ {aka ‘long unsigned int’} [-fpermissive]
51 | strftime(indatestring,informat,&tm_tmp);
| ^~~~~~~~
| |
| char*
dateconv.cc:51:34: error: cannot convert ‘tm*’ to ‘const char*’
51 | strftime(indatestring,informat,&tm_tmp);
| ^~~~~~~
| |
| tm*
In file included from /usr/include/pthread.h:14,
from /usr/lib/gcc/x86_64-pc-cygwin/9.3.0/include/c++/x86_64-pc-cygwin/bits/gthr-default.h:35,
from /usr/lib/gcc/x86_64-pc-cygwin/9.3.0/include/c++/x86_64-pc-cygwin/bits/gthr.h:148,
from /usr/lib/gcc/x86_64-pc-cygwin/9.3.0/include/c++/ext/atomicity.h:35,
from /usr/lib/gcc/x86_64-pc-cygwin/9.3.0/include/c++/bits/ios_base.h:39,
from /usr/lib/gcc/x86_64-pc-cygwin/9.3.0/include/c++/ios:42,
from /usr/lib/gcc/x86_64-pc-cygwin/9.3.0/include/c++/ostream:38,
from /usr/lib/gcc/x86_64-pc-cygwin/9.3.0/include/c++/iostream:39,
from dateconv.cc:9:
/usr/include/time.h:67:49: note: initializing argument 3 of ‘size_t strftime(char*, size_t, const char*, const tm*)’
67 | size_t _maxsize, const char *__restrict _fmt,
| ~~~~~~~~~~~~~~~~~~~~~~~^~~~
make: *** [: dateconv.o] Error 1
and it doesn't run the make command for the sar_tools.
Does anyone know how to fix it?
The text was updated successfully, but these errors were encountered:
vasilikisdr
changed the title
While installing the sar_tools I get that In function ‘int main(int, char**)’
Invalid convertion in int main function
Apr 20, 2020
While installing the sar_tools I get that
dateconv.cc: In function ‘int main(int, char**)’:
error: invalid conversion from ‘char*’ to ‘size_t’ {aka ‘long unsigned int’} [-fpermissive]
51 | strftime(indatestring,informat,&tm_tmp);
| ^~~~~~~~
| |
| char*
dateconv.cc:51:34: error: cannot convert ‘tm*’ to ‘const char*’
51 | strftime(indatestring,informat,&tm_tmp);
| ^~~~~~~
| |
| tm*
In file included from /usr/include/pthread.h:14,
from /usr/lib/gcc/x86_64-pc-cygwin/9.3.0/include/c++/x86_64-pc-cygwin/bits/gthr-default.h:35,
from /usr/lib/gcc/x86_64-pc-cygwin/9.3.0/include/c++/x86_64-pc-cygwin/bits/gthr.h:148,
from /usr/lib/gcc/x86_64-pc-cygwin/9.3.0/include/c++/ext/atomicity.h:35,
from /usr/lib/gcc/x86_64-pc-cygwin/9.3.0/include/c++/bits/ios_base.h:39,
from /usr/lib/gcc/x86_64-pc-cygwin/9.3.0/include/c++/ios:42,
from /usr/lib/gcc/x86_64-pc-cygwin/9.3.0/include/c++/ostream:38,
from /usr/lib/gcc/x86_64-pc-cygwin/9.3.0/include/c++/iostream:39,
from dateconv.cc:9:
/usr/include/time.h:67:49: note: initializing argument 3 of ‘size_t strftime(char*, size_t, const char*, const tm*)’
67 | size_t _maxsize, const char *__restrict _fmt,
| ~~~~~~~~~~~~~~~~~~~~~~~^~~~
make: *** [: dateconv.o] Error 1
and it doesn't run the make command for the sar_tools.
Does anyone know how to fix it?
The text was updated successfully, but these errors were encountered: