Logo Questions Linux Laravel Mysql Ubuntu Git Menu
 

Does deprecation effect the runtime of the application?

I am developing some applications (MSVC++) and I always run into deprecation warnings. To be general, in this question I am asking lets say I use the standard C90:

fopen()

over

fopen_s() <- as msvc++ suggests for me to use

Does this mean that after compiling my application, lets say a windows 8 user wants to use it, would he get less of the feature from it, in lesser terms, does that mean when he runs the application then the fopen() function will not be recognized since it is "deprecated" (I assume it means it's outdated)?

Also, if say it doesn't matter whether I use it or not, MSVC++ says that I can use the _CRT_SECURE_NO_WARNINGS flag to ignore deprecation, if so, where can I include this flag so it ignores the warnings?

like image 881
user3267146 Avatar asked Jan 19 '26 06:01

user3267146


1 Answers

In the case of the MSVC runtime functions, no, there is no risk of compatibility problems if you use deprecated functions like fopen().

The code for fopen() exists in the MSVC runtime library and your application either (a) links with that library statically, or (b) uses a specific version of a DLL. The DLL version used by the app will be the same wherever your app runs, so you don't have to be concerned about Windows 8 not having an appropriate DLL.

The MSDN documentation Security Features in the CRT states:

In this context, "deprecated" just means that a function's use is not recommended; it does not indicate that the function is scheduled to be removed from the CRT.

like image 156
Greg Hewgill Avatar answered Jan 20 '26 20:01

Greg Hewgill