Closed saltedcoffii closed 2 years ago
Hello! Thank you for the patch, but docker build -t tgs-to-gif .
works with an error:
/application/main.cpp:33:35: error: 'basename' was not declared in this scope; did you mean 'rename'?
33 | argparse::ArgumentParser program(basename(argv[0]));
| ^~~~~~~~
| rename
make[2]: *** [CMakeFiles/tgs_to_gif.dir/build.make:76: CMakeFiles/tgs_to_gif.dir/main.cpp.o] Error 1
make[1]: *** [CMakeFiles/Makefile2:83: CMakeFiles/tgs_to_gif.dir/all] Error 2
make: *** [Makefile:91: all] Error 2
Thank you I will look into this.
It appears as though the Dockerfile uses alpine linux, with musl libc. The basename(argv[0]) syntax is not supported by musl. I added the libgen.h header, which adds the basename function, however I'm still struggling to fix the argv part. Any and all help is welcome.
master-cpp
has renamed to master
previous master
become master-nodejs
please, rebase and reopen the pull request to master
I'm not going to reopen this because the .sh scripts can be renamed or symlinked and respect their new names. Thank you!
In the current main.cpp code, the help function calls the executable
tgs-to-gif
, which works great! until the executable is renamed, to, e.g.,tgs-to-gif
ortgs2gif
, the latter being the seeminly defacto standard for simple conversion programs (e.g.,apng2gif
,dos2unix
,help2man
, etc.) This simple change allows the Usage line to display correctly when the binary is renamed or symlinked to another name.Builds and works on Linux.