'gSoap error : xlocale.h No such file or directory

I am trying to create C++ soap webservice client in Windows 7. I am using gSoap and I followed gSoap tutorial.

first and second commands worked but

c++ -o main main.cpp soapC.cpp soapcalcProxy.cpp stdsoap2.cpp

command did not work.

error is

Microsoft Windows [Version 6.1.7601]
Copyright (c) 2009 Microsoft Corporation.  All rights reserved.

C:\Users\user\Desktop\soap>C:\MinGW\bin\mingw32-g++.exe -o main main.cpp soapC.cpp soapcalcProxy.cpp stdsoap2.cpp
In file included from soapStub.h:22:0,
                 from soapH.h:16,
                 from calc.nsmap:2,
                 from main.cpp:16:
stdsoap2.h:651:23: fatal error: xlocale.h: No such file or directory
compilation terminated.
In file included from soapStub.h:22:0,
                 from soapH.h:16,
                 from soapC.cpp:19:
stdsoap2.h:651:23: fatal error: xlocale.h: No such file or directory
compilation terminated.
In file included from soapStub.h:22:0,
                 from soapH.h:16,
                 from soapcalcProxy.h:16,
                 from soapcalcProxy.cpp:14:
stdsoap2.h:651:23: fatal error: xlocale.h: No such file or directory
compilation terminated.
In file included from stdsoap2.cpp:60:0:
stdsoap2.h:651:23: fatal error: xlocale.h: No such file or directory
compilation terminated.

How can I solve it ? I am using Windows 7 64 bit and mingw. Thanks.



Solution 1:[1]

I had the same problem, I solved it by adding the -DWITH_NO_C_LOCALE option when compiling. Source: https://sourceforge.net/p/gsoap2/bugs/1098/

Sources

This article follows the attribution requirements of Stack Overflow and is licensed under CC BY-SA 3.0.

Source: Stack Overflow

Solution Source
Solution 1 vinzee