Error c3861: “strcasecmp”: identifier not found

1、 Problem description.

The C/C + + program compiles normally in Linux, and an error is reported in Windows: error c3861: “strcasecmp”:   Identifier not found.

2、 Problem analysis.

There is no library function related to strcasecmp in windows.

3、 Solutions.

Declare the library function of strcasecmp under windows.

#ifdef _WIN32
	//#define strcasecmp _stricmp
	//#define strncasecmp _strnicmp
#endif
#ifdef _MSC_VER
	#define strcasecmp _stricmp
	#define strncasecmp _strnicmp
#endif

 

Read More: