Skip to content
  • Categories
  • Recent
  • Tags
  • Popular
  • Users
  • Groups
  • Search
  • Get Qt Extensions
  • Unsolved
Collapse
Brand Logo
  1. Home
  2. Qt Development
  3. General and Desktop
  4. gSoap QT undefined reference

gSoap QT undefined reference

Scheduled Pinned Locked Moved General and Desktop
gsoap
8 Posts 3 Posters 2.2k Views
  • 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 Offline
    M Offline
    MajdiKharroubi
    wrote on last edited by MajdiKharroubi
    #1

    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
    0
    • M Offline
      M Offline
      mcosta
      wrote on last edited by mcosta
      #2

      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
      0
      • M Offline
        M Offline
        MajdiKharroubi
        wrote on last edited by MajdiKharroubi
        #3

        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
        0
        • M Offline
          M Offline
          MajdiKharroubi
          wrote on last edited by
          #4

          Sorry i have no idea how to use code formatting

          p3c0P 1 Reply Last reply
          0
          • M MajdiKharroubi

            Sorry i have no idea how to use code formatting

            p3c0P Offline
            p3c0P Offline
            p3c0
            Moderators
            wrote on last edited by
            #5

            @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
            0
            • p3c0P p3c0

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

              M Offline
              M Offline
              MajdiKharroubi
              wrote on last edited by
              #6

              @p3c0 thank you

              1 Reply Last reply
              0
              • M 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)

                M Offline
                M Offline
                MajdiKharroubi
                wrote on last edited by
                #7

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

                1 Reply Last reply
                0
                • M Offline
                  M Offline
                  mcosta
                  wrote on last edited by
                  #8

                  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
                  0

                  • Login

                  • Login or register to search.
                  • First post
                    Last post
                  0
                  • Categories
                  • Recent
                  • Tags
                  • Popular
                  • Users
                  • Groups
                  • Search
                  • Get Qt Extensions
                  • Unsolved