swprintf

swprintf

I am a relatively novice programmer working with icc v7 under RedHat Linux 8.0. When compiling code using the "swprintf" function, the compiler tells me that swprintf is undefined. Am I missing a particular header file? In the /usr/include directory, wchar.h appears to define this function but, even when I include this file and use -I/usr/include when compiling, icc still reports that swprintf is undefined . . .

2 Beiträge / 0 neu
Letzter Beitrag
Nähere Informationen zur Compiler-Optimierung finden Sie in unserem Optimierungshinweis.

Declaration (prototype) for swprintf is included in a program only if __USE_ISOC99 macro is defined - refer to wchar.h or cwchar header files.

This macro is defined, in /usr/include/features.h, iff _GNU_SOURCE macro is defined.

In summary, define this macro, -D_GNU_SOURCE=1, on command line to include swprintf decl.

Regards,
CP

Kommentar hinterlassen

Bitte anmelden, um einen Kommentar hinzuzufügen. Sie sind noch nicht Mitglied? Jetzt teilnehmen