I've a C++ application that works in actual compilers (I compile it with eclipse). Now, I need compile it on a very old compiler version (gcc/c++ v2.96) on a Redhat 7.3 with Kdevelop.
When I compile the app it gives the following error: swprintf undeclared. wchar.h header it's included, but I saw this file in the RH7.3 OS and only declare this function if __USE_UNIX98 __USE_ISOC99 are declared.
How can I enable __USE_UNIX98?
Best How To :
GNU libc defines the features that should be enabled in all of its headers using a special system header
<features.h>. If you define the appropriate macros,
<features.h> will define
__USE_UNIX98 for you.
The typical way to get all functions, regardless of what standard (if any) covers them, is by adding
-D_GNU_SOURCE on the command-line. Getting only the functions covered by a specific standard requires defining the macro as specified in that standard using the value specified in that standard, such as
-D_POSIX_C_SOURCE=200112L. The precise values that are supported on your particular implementation are probably easiest found by inspecting