Closed erusyd closed 1 year ago
I face the same issue under Ubuntu 20.04 while compiling with clang 12. It seems as if the localtime_s is not portable see this for an explanation.
Ah hmm this is my fault, sorry guys. A PR adding support for timestamps I added was merged with this bug
Msvc actually errors, not warns, when you use localtime
so I mistakenly believed I missed something...
Same here OS: linux ubuntu OS Version: 22.04 Compiler: g++ Compiler version: 9.4.0
Hello Fellows,
I had the same issue. There is two localtime_s, one fromWindows Visual Studio extension and one from C standard library.
My compiler clearly understood that we are using Window ones so it doesn't compile.
For the time being I came back to a previous versions by the following command git reset --hard 8dbea7
I didn't find yet the way to change from Window.
To be honest, I'm a bit disappointed to see two function with the exact same name not compatible. However, it is clearly state in the description of the C Library:
The implementation of localtime_s in Microsoft CRT is incompatible with the C standard since it has reversed parameter order and returns errno_t.
Bug category
Describe the bug Compile from the source, it complains: error: ‘localtime_s’ was not declared in this scope
Steps to Reproduce
Output /source/matplot/core/axis_type.cpp:260:21: error: ‘localtime_s’ was not declared in this scope; did you mean ‘localtime_r’? 260 | localtime_s(&buf, &now); | ^
~~| localtime_r make[2]: *** [source/matplot/CMakeFiles/matplot.dir/build.make:128: source/matplot/CMakeFiles/matplot.dir/core/axis_type.cpp.o] Error 1Platform
Environment Details:
Additional context