Menu

#1057 error LNK2019: unresolved external symbol

v1.0 (example)
closed
None
5
2016-05-29
2016-05-24
No

Hello! I try to compile code, but got an errors:

1>stdsoap2.obj : error LNK2019: unresolved external symbol _soap_faultcode referenced in function _soap_print_fault
1>stdsoap2.obj : error LNK2019: unresolved external symbol _soap_faultsubcode referenced in function _soap_set_error
1>stdsoap2.obj : error LNK2019: unresolved external symbol _soap_faultstring referenced in function _soap_print_fault
1>stdsoap2.obj : error LNK2019: unresolved external symbol _soap_faultdetail referenced in function _soap_set_error
1>stdsoap2.obj : error LNK2019: unresolved external symbol _soap_check_faultsubcode referenced in function _soap_print_fault
1>stdsoap2.obj : error LNK2019: unresolved external symbol _soap_check_faultdetail referenced in function _soap_print_fault
1>stdsoap2.obj : error LNK2019: unresolved external symbol _soap_serializefault referenced in function _soap_send_fault
1>stdsoap2.obj : error LNK2019: unresolved external symbol _soap_serializeheader referenced in function _soap_send_fault
1>stdsoap2.obj : error LNK2019: unresolved external symbol _soap_getheader referenced in function _soap_recv_header
1>stdsoap2.obj : error LNK2019: unresolved external symbol _soap_putheader referenced in function _soap_send_fault
1>stdsoap2.obj : error LNK2019: unresolved external symbol _soap_getfault referenced in function _soap_recv_fault
1>stdsoap2.obj : error LNK2019: unresolved external symbol _soap_putfault referenced in function _soap_send_fault
1>dom.obj : error LNK2019: unresolved external symbol _soap_markelement referenced in function "void __cdecl soap_serialize_xsd__anyType(struct soap ,struct soap_dom_element const )" (?soap_serialize_xsd__anyType@@YAXPAUsoap@@PBUsoap_dom_element@@@Z)
1>dom.obj : error LNK2019: unresolved external symbol _soap_putelement referenced in function "int __cdecl out_element(struct soap ,struct soap_dom_element const ,char const ,char const )" (?out_element@@YAHPAUsoap@@PBUsoap_dom_element@@PBD2@Z)
1>dom.obj : error LNK2019: unresolved external symbol _soap_getelement referenced in function "struct soap_dom_element * __cdecl soap_in_xsd__anyType(struct soap ,char const ,struct soap_dom_element ,char const )" (?soap_in_xsd__anyType@@YAPAUsoap_dom_element@@PAUsoap@@PBDPAU1@1@Z)
1>D:\CODE\adapters\var\build\win32\Debug\bin\Debug\xxx.exe : fatal error LNK1120: 15 unresolved externals

gSoap 2.8.32

Win7x64, MSVS 2013
defines: -DWITH_NONAMESPACES -DWITH_NOHTTP
CMAKE_CXX_FLAGS /bigobj

wsdl2h -f -u -P -d -ntobUdp -o tob-build/tob_udp_soap.h udp.xsd
soapcpp2 -1 -C -b -x -j -qtobUdp -d tob-build -I import tob-build/tob_udp_soap.h

wsdl2h -f -u -P -d -ntobMsg -o tob-build/tob_messages_soap.h baseMessages.xsd
soapcpp2 -1 -C -b -x -j -qtobMsg -d tob-build -I import tob-build/tob_messages_soap.h

project files:

${PRJ_ADAPTER_SRC}/gsoap/stdsoap2.h
${PRJ_ADAPTER_SRC}/gsoap/tobol-build/tobolMsg1.nsmap
${PRJ_ADAPTER_SRC}/gsoap/tobol-build/soap.nsmap
${PRJ_ADAPTER_SRC}/gsoap/tobol-build/tobolMsgH.h
${PRJ_ADAPTER_SRC}/gsoap/tobol-build/tobolMsgStub.h
${PRJ_ADAPTER_SRC}/gsoap/tobol-build/tobolUdpH.h
${PRJ_ADAPTER_SRC}/gsoap/tobol-build/tobolUdpStub.h

${PRJ_ADAPTER_SRC}/gsoap/tobol-build/tobolMsgC.cpp
${PRJ_ADAPTER_SRC}/gsoap/tobol-build/tobolUdpC.cpp
${PRJ_ADAPTER_SRC}/gsoap/stdsoap2.cpp
${PRJ_ADAPTER_SRC}/gsoap/dom.cpp

Discussion

  • Dontsov Evgeny

    Dontsov Evgeny - 2016-05-24

    as I have the same errors in 2.8.23 version, i do something wrong.. what?
    When I turned off renaming files, soap compiled successfully.

     

    Last edit: Dontsov Evgeny 2016-05-25
  • Robert van Engelen

    When using C++ namespaces with soapcpp2 option -q or when renaming with option -p, please do not forget to create an envH.cpp file with the SOAP Header and SOAP Fault serializers:

    soapcpp2 env.h
    

    The env.h file is empty or contains the SOAP_ENV__Header struct and SOAP_ENV__Fault struct. These structs should be copied to env.h from the .h file generated by wsdl2h.

    See

    http://www.cs.fsu.edu/~engelen/soapdoc2.html#tth_sEc19.36

     
  • Robert van Engelen

    • status: open --> closed
     

Log in to post a comment.

MongoDB Logo MongoDB