Skip to content
New issue

Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.

By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.

Already on GitHub? Sign in to your account

Invalid convertion in int main function #20

Open
vasilikisdr opened this issue Apr 20, 2020 · 0 comments
Open

Invalid convertion in int main function #20

vasilikisdr opened this issue Apr 20, 2020 · 0 comments

Comments

@vasilikisdr
Copy link

vasilikisdr commented 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?

@vasilikisdr 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
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
None yet
Projects
None yet
Development

No branches or pull requests

1 participant