I am trying to Build the Hadoop 2.7.1 Sources in a Windows Server 2012 using Visual Studio Professional 2015.
The build of the winutils project failed, because an error in the libwinutils.c file. I installed the required software and set all of the environment variables. More or less I followed the directions from here: Hadoop on Windows Building/ Installation Error
I commented out a line of the code and replace it as it can be seen below. Basically, I just stringify the "WSCE_CONFIG_DIR" and the "WSCE_CONFIG_FILE" but I removed the use of the macro that converts the strings to wide character, and it worked. But I really want to know why is the original code not working.
#define WIDEN_STRING(x) WIDEN_STRING_(x)
#define WIDEN_STRING_(x) L ## x
#define STRINGIFY(x) STRINGIFY_(x)
#define STRINGIFY_(x) #x
#pragma message("WSCE config is " STRINGIFY(WSCE_CONFIG_DIR) "\\" STRINGIFY(WSCE_CONFIG_FILE))
//const WCHAR* wsceConfigRelativePath = WIDEN_STRING(STRINGIFY(WSCE_CONFIG_DIR)) L"\\" WIDEN_STRING(STRINGIFY(WSCE_CONFIG_FILE));
const WCHAR* wsceConfigRelativePath = STRINGIFY(WSCE_CONFIG_DIR) "\\" STRINGIFY(WSCE_CONFIG_FILE);
Any comment would be highly appreciated.
Kind Regards, Paul