Qt Forum

    • Login
    • Search
    • Categories
    • Recent
    • Tags
    • Popular
    • Users
    • Groups
    • Search
    • Unsolved

    gSoap QT undefined reference

    General and Desktop
    gsoap
    3
    8
    1935
    Loading More Posts
    • Oldest to Newest
    • Newest to Oldest
    • Most Votes
    Reply
    • Reply as topic
    Log in to reply
    This topic has been deleted. Only users with topic management privileges can see it.
    • M
      MajdiKharroubi last edited by MajdiKharroubi

      i'm trying to use gSOAP to create a server/client

      this is my Test.h file that i'm using

      //gsoap ns service name:    ColisageMutexService
      //gsoap ns service style:   rpc
      //gsoap ns service encoding:    literal
      //gsoap ns service location:    http://localhost:1444
      //gsoap ns schema namespace: urn:ColisageMutex
      class FamilleProduit
      {
      private:
          int Id;
          std::string Libelle;
      public:
          FamilleProduit();
          ~FamilleProduit();
          int getId();
          void setId(int value);
          std::string getLibelle();
          void setLibelle(std::string value);
      };
      
      //gsoap ns service method-action: ajouterByType ""
      
      int ns__ajouterByType ( FamilleProduit familleproduit, bool * result);
      
      //gsoap ns service method-action: ajouterByLibelle ""
      
      int ns__ajouterByLibelle ( std::string libelle, bool * result);
      

      I run soapcpp2.exe -I -pTest Test.h and I integrate the generated code with my project but the probleme that the compiler keep giving me errors

      error: undefined reference to ns__ajouterByType(soap*, FamilleProduit, bool*)

      and

      error: undefined reference to ns__ajouterByLibelle(soap*, std::string, bool*)

      even that i added in my main the implement of this tow function

      1 Reply Last reply Reply Quote 0
      • M
        mcosta last edited by mcosta

        Hi,

        can you post your .pro file?
        The error is related to a missing module/library linked to the application

        PLEASE: Use code formatting (it makes the post more readable)

        Once your problem is solved don't forget to:

        • Mark the thread as SOLVED using the Topic Tool menu
        • Vote up the answer(s) that helped you to solve the issue

        You can embed images using (http://imgur.com/) or (http://postimage.org/)

        M 1 Reply Last reply Reply Quote 0
        • M
          MajdiKharroubi last edited by MajdiKharroubi

          This is my pro file :

          QT       += core
          
          QT       -= gui
          
          QT       += sql
          
          QT       += network
          
          LIBS    += C:\Qt\Tools\mingw491_32\i686-w64-mingw32\lib\libws2_32.a
          TARGET = ServeurColisage
          CONFIG   += console
          CONFIG   -= app_bundle
          
          TEMPLATE = app
          
          
          SOURCES += main.cpp \
              typedocumentdao.cpp \
              typedocument.cpp \
              connexion.cpp \
              libelle.cpp \
              libelledao.cpp \
              familleproduit.cpp \
              familleproduitdao.cpp \
              stdsoap2.cpp \
              TestC.cpp \
              TestServer.cpp
          
          HEADERS += \
              typedocumentdao.h \
              includes.h \
              typedocument.h \
              connexion.h \
              crude.h \
              libelle.h \
              libelledao.h \
              familleproduit.h \
              familleproduitdao.h \
              stdsoap2.h \
              TestH.h \
              TestStub.h \
              ColisageMutexService.nsmap
          

          thank you

          1 Reply Last reply Reply Quote 0
          • M
            MajdiKharroubi last edited by

            Sorry i have no idea how to use code formatting

            p3c0 1 Reply Last reply Reply Quote 0
            • p3c0
              p3c0 Moderators @MajdiKharroubi last edited by

              @MajdiKharroubi add your code after ``` (3 Backticks) and then end with the same. You can find more info here.

              157

              M 1 Reply Last reply Reply Quote 0
              • M
                MajdiKharroubi @p3c0 last edited by

                @p3c0 thank you

                1 Reply Last reply Reply Quote 0
                • M
                  MajdiKharroubi @mcosta last edited by

                  @mcosta hello I posted my .pro file can you help me please

                  1 Reply Last reply Reply Quote 0
                  • M
                    mcosta last edited by

                    Hi,

                    where is ns__ajouterByType implemented??? I don't know so much gSoap but I see you don't link any libraries from it; is correct?

                    Once your problem is solved don't forget to:

                    • Mark the thread as SOLVED using the Topic Tool menu
                    • Vote up the answer(s) that helped you to solve the issue

                    You can embed images using (http://imgur.com/) or (http://postimage.org/)

                    1 Reply Last reply Reply Quote 0
                    • First post
                      Last post