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. [SOLVED] QtSingleApplication
QtWS25 Last Chance

[SOLVED] QtSingleApplication

Scheduled Pinned Locked Moved General and Desktop
13 Posts 4 Posters 10.4k 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
    maxim.prishchepa
    wrote on last edited by
    #4

    but if i add just "qtsingleapplication" I have next errors:
    @1>Linking...
    1>qtsingleapplication.obj : error LNK2019: unresolved external symbol "public: __thiscall QtLocalPeer::QtLocalPeer(class QObject *,class QString const &)" (??0QtLocalPeer@@QAE@PAVQObject@@ABVQString@@@Z) referenced in function "private: void __thiscall QtSingleApplication::sysInit(class QString const &)" (?sysInit@QtSingleApplication@@AAEXABVQString@@@Z)
    1>qtsingleapplication.obj : error LNK2019: unresolved external symbol "public: bool __thiscall QtLocalPeer::isClient(void)" (?isClient@QtLocalPeer@@QAE_NXZ) referenced in function "public: bool __thiscall QtSingleApplication::isRunning(void)" (?isRunning@QtSingleApplication@@QAE_NXZ)
    1>qtsingleapplication.obj : error LNK2019: unresolved external symbol "public: bool __thiscall QtLocalPeer::sendMessage(class QString const &,int)" (?sendMessage@QtLocalPeer@@QAE_NABVQString@@H@Z) referenced in function "public: bool __thiscall QtSingleApplication::sendMessage(class QString const &,int)" (?sendMessage@QtSingleApplication@@QAE_NABVQString@@H@Z)
    1>D:\Projects\test\test\Debug\test.exe : fatal error LNK1120: 3 unresolved externals@

    Programming Is Like Sex: One mistake and you have to support it for the rest of your life. (Michael Sinz).

    1 Reply Last reply
    0
    • G Offline
      G Offline
      giesbert
      wrote on last edited by
      #5

      you need all of them, but you should check, whther there are some import/export statements. If yes and you add them to your exe, remove them.

      Nokia Certified Qt Specialist.
      Programming Is Like Sex: One mistake and you have to support it for the rest of your life. (Michael Sinz)

      1 Reply Last reply
      0
      • V Offline
        V Offline
        vsorokin
        wrote on last edited by
        #6

        Seems like you forgot add library to LIBS var in your .pro file

        --
        Vasiliy

        1 Reply Last reply
        0
        • G Offline
          G Offline
          giesbert
          wrote on last edited by
          #7

          In which library should QtSingleApplication be located? AFAIK it is part of the old Qt solutions, which you get as source. You can add it to a library or put the sources directly to your app.

          Nokia Certified Qt Specialist.
          Programming Is Like Sex: One mistake and you have to support it for the rest of your life. (Michael Sinz)

          1 Reply Last reply
          0
          • M Offline
            M Offline
            maxim.prishchepa
            wrote on last edited by
            #8

            You mean, I need compile QtSolutions like lib, and than add this lib to my project?

            Programming Is Like Sex: One mistake and you have to support it for the rest of your life. (Michael Sinz).

            1 Reply Last reply
            0
            • G Offline
              G Offline
              giesbert
              wrote on last edited by
              #9

              Or add the files to your sources and remove the dllexport/import statements in front of the classes

              Nokia Certified Qt Specialist.
              Programming Is Like Sex: One mistake and you have to support it for the rest of your life. (Michael Sinz)

              1 Reply Last reply
              0
              • L Offline
                L Offline
                loladiro
                wrote on last edited by
                #10

                Watch out for licensing issues though. AFAIK, Qt solutions is under the LGPL and therefore if you include it directly in your code, it has to be an open source app.

                1 Reply Last reply
                0
                • G Offline
                  G Offline
                  giesbert
                  wrote on last edited by
                  #11

                  I don't know how it is now, but some time ago, it was the same license as Qt itself, so if you have a commercial license, it was commercial, etc....

                  Nokia Certified Qt Specialist.
                  Programming Is Like Sex: One mistake and you have to support it for the rest of your life. (Michael Sinz)

                  1 Reply Last reply
                  0
                  • L Offline
                    L Offline
                    loladiro
                    wrote on last edited by
                    #12

                    It's still that way (at least if your license agreement includes the Qt Solutions). BTW, for everybody that doesn't know, the Qt Solutions archive is located at ftp://ftp.qt.nokia.com/qt/solutions/ !

                    1 Reply Last reply
                    0
                    • M Offline
                      M Offline
                      maxim.prishchepa
                      wrote on last edited by
                      #13

                      Thx, a lot for the help!
                      I'm compile source like lib and dll than add them to project and include headers to project.

                      Programming Is Like Sex: One mistake and you have to support it for the rest of your life. (Michael Sinz).

                      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