[SOLVED] QtSingleApplication
-
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@ -
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.
-
Seems like you forgot add library to LIBS var in your .pro file
-
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.
-
You mean, I need compile QtSolutions like lib, and than add this lib to my project?
-
Or add the files to your sources and remove the dllexport/import statements in front of the classes
-
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.
-
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....
-
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/ !
-
Thx, a lot for the help!
I'm compile source like lib and dll than add them to project and include headers to project.