fatal error: xlocale.h: No such file or directory
Development toolkit for Web Services and XML data bindings for C & C++
Brought to you by:
engelen
I followed https://www.genivia.com/dev.html#client-cpp tutorial.
wsdl2h -o calc.h http://www.genivia.com/calc.wsdland
soapcpp2 -j -CL -I/path/to/gsoap/import calc.h worked. but
c++ -o calcclient calcclient.cpp soapC.cpp soapcalcProxy.cpp stdsoap2.cppcommand returns error
In file included from soapStub.h:22:0,
from soapH.h:16,
from calc.nsmap:2,
from calcclient.cpp:1:
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.
I installed mingw but there is no xlocale.h file in my PC. Why this happen ?
I am using windows7
In this case compile with
-DWITH_NO_C_LOCALEto remove locale support. See documentation.Or perhaps you can try to change stdsoap2.h:668
#ifdefs to make it work with MINGW:-DWITH_NO_C_LOCALEis not working for me. And if I changed ifdefs I get error because of_create_localeand_free_localeWorks fine in our tests:
Perhaps this is a MingGW issue.
Hi Robert,
thanks for your response
my
C++compiler is thiswhat is your
cccompiler ? is it gcc or windows compiler ? Also you testedCversion of library. is there possiblity of bug inC++version ?thanks.
Last edit: io 2017-02-03
Don't know. You have to figure out why compiling with -DWITH_NO_C_LOCALE fails. Look in the stdsoap2.cpp code for WITH_NO_C_LOCALE that #undefs WITH_C_LOCALE. Since WITH_C_LOCALE is turned off, all locale handling should be turned off.
Hi Robert,
I found a website (http://planetcubicle.blogspot.com.tr/2013/10/building-c-gsoap-web-service-client.html) about gSoap compilation with mingw. it says I have to link against libws2_32.a.
So if I compile with this commad, it works
c++ -o calcclient calcclient.cpp soapC.cpp soapcalcProxy.cpp stdsoap2.cpp -DWITH_NO_C_LOCALE -lws2_32for your information.
thanks for help.
Version 2.8.44 should fix the MinGW "missing xlocale.h" compilation error, at least it works on Cygwin too. And indeed, make sure to link against libws2_32.a as you suggested. The online installation docs are updated to reflect that.