[solved] How can use KDSoap in my project



  • hi, recently i try a create a client to soap in c++ and i decide use kdsoap, i get install and build easily, but i can't get use properly in my project, someone have manual, example or similar, actually, i edit my file .pro, adding 1 file .pri (similar to used in the examples), and i don't get errors in compilation, but in the end try create a executable file in /bin, the message is similar to: " /usr/bin/ld: can not open out file, /bin/kiosco-touch: denied permission".

    My .pro file is generated by qmake -project tool, and only add the next lines

    @
    QT += quick qml network

    include( includeKdsoap.pri ) @

    And the includeKdsoap.pri file is this

    @
    INCLUDEPATH +=
    /home/user/proyects/KDSoap/src
    /home/user/proyects/KDSoap/src/KDSoapClient
    /home/user/proyects/KDSoap/src/KDSoapServer
    DEPENDPATH +=
    /home/user/proyects/KDSoap/src
    /home/user/proyects/KDSoap/src/KDSoapClient
    /home/user/proyects/KDSoap/KDSoapServer
    LIBS += -L/home/user/proyects/KDSoap/lib -l/home/user/proyect/KDSoap/
    !isEmpty(QMAKE_LFLAGS_RPATH):LIBS += $$QMAKE_LFLAGS_RPATH/home/user/proyects/KDSoap/lib

    include(/home/user/proyects/KDSoap/variables.pri)
    DEFINES -= QT_NO_CAST_FROM_ASCII@

    and in my MakeFile in the end appears this (i try edit, but when i make the compilation says /usr/bin/ld: can not find -l/home/user/proyects/KDSoap/)

    @QMAKE_TARGET = screen-touch-interface
    DESTDIR = /bin/#avoid trailing-slash linebreak
    TARGET = /bin/screen-touch-interface@

    I gratefulness any suggestion


  • Lifetime Qt Champion

    Hi,

    You can't write to /bin without root permission and there's currently no reason to do that while developing. You could break your system if you overwrite or erase some key element. Also the TARGET variable should contain the name of application/library not a path to it.



  • hi, thanks, i know i can not write in /bin location, but i don't know how avoid, when execute the qmake command, the makefile appears how i say previously, (even if i edit the makefile), and when i edit their parameters, the compiler says cannot locate KDSoap.
    My question is how i will edit the file .pro and the .pri file, for read correctly the library path.


  • Lifetime Qt Champion

    Don't set DESTDIR nor TARGET to /bin

    @
    LIBS += -L/home/user/proyects/KDSoap/lib -l/home/user/proyect/KDSoap/
    @

    after -l you must have the library name minus lib e.g. -lkdsoap if the file name is libkdsoap.dylib

    @
    !isEmpty(QMAKE_LFLAGS_RPATH):LIBS +=
    $$QMAKE_LFLAGS_RPATH/home/user/proyects/KDSoap/lib@

    That's wrong, QMAKE_LFLAGS_RPATH can contain several values.



  • thanks, originally only copy .pri files from examples, but i edit line by line and now works, here is the content of new file includeKdsoap.pri

    @
    LIBS += -L/home/user/proyects/KDSoap/lib -lkdsoap

    INCLUDEPATH +=
    /home/user/proyects/KDSoap/include
    /home/user/proyects/KDSoap/src
    /home/user/proyects/KDSoap/src/KDSoapClient
    /home/user/proyects/KDSoap/src/KDSoapServer
    DEPENDPATH +=
    /home/user/proyects/KDSoap/src
    /home/user/proyects/KDSoap/include
    /home/user/proyects/KDSoap/src/KDSoapClient
    /home/user/proyects/KDSoap/src/KDSoapServer
    @


  • Lifetime Qt Champion

    You're welcome !

    Looks like there's a bit too many include paths :)

    Anyway, since you have it working now, please update the thread title prepending [solved] so other forum users may know a solution has been found :)


Log in to reply
 

Looks like your connection to Qt Forum was lost, please wait while we try to reconnect.