Closed pwpiwi closed 3 years ago
Hi @pwpiwi , when I tried to fix this issue in the msys2/mingw64 environment, I kept seeing the following error:
D:/Projects/argtable3/build_mingw64/src/version.rc:33:10: fatal error: verrsrc.h: No such file or directory
33 | #include <verrsrc.h>
| ^~~~~~~~~~~
compilation terminated.
Do you have the same issue? If yes, how did you fix it? Thanks.
Don't know. I never tried to build it. I am using the "amalgamation" argtable3.c instead. . I googled for this file and it seems to be part of Visual Studio. Therefore not available on msys2/mingw
Re getenv_s(): Why using it at all? In your case you just want to check if the environment variable is availabe. Isn't this always safe?
It might be an issue of msys2/mingw64, because msys2/mingw32 doesn't have this issue.
getenv_s()
is used to make Visual Studio compiler happy, because VC++ wants us to use more secure functions. Otherwise, it will show tons of warnings.
This is on mingw. I propose to add the usual checks for the availability of this C11 extension: