-
Notifications
You must be signed in to change notification settings - Fork 19
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
Some deprecated function #5
Comments
The C API is used for performance reasons. Visual C++ is the only compiler that I know of that "warns" about these functions. Note that they are not deprecated by the ISO C++ standard; technically, Visual C++ is wrong. When building with CMake, the preprocessor definition you mention is indeed set; see here: See here for more information how to build Selene using CMake: Alternatively, it should be possible to install a released version of Selene using vcpkg; see here: |
The errors appeared when using the vcpkg. I disable this warning by add include directive: #ifdef _MSC_VER
#pragma warning(disable:4996)
#endif
#include <selene/img_io/IO.hpp> |
Yep, you're right. Can you double check if the changes made in 35264eb fix all the warnings, after removing the pragma in your client code again? I can't test behavior on Windows right now, but I think this should work. |
It works for me. Thx |
Merged. #6 |
FileReader.hpp
use functionfopen
andstrerror
, these functions are marked as deprecated in MSVC(for me, Visual Studio 2017). It requires a definition of macro_CRT_SECURE_NO_WARNINGS
or use the suggestedfopen_s
orstrerror_s
. Why don't you choosestd::ifstream?
The text was updated successfully, but these errors were encountered: