[SOLVED] QtSingleApplication
Hi All!
I write in VS2008, I wont create QtSingleApplication application. I’m create Qt Application, then add to my project path to “src” files QtSingleApplication, then rewrite QtApplication to QtSingleApplication, write
- #include "QtSingleApplication";
- 1>LINK : D:\Projects\test\test\Debug\test.exe not found or not built by the last incremental link; performing full link
- 1>main.obj : error LNK2019: unresolved external symbol "public: __thiscall QtSingleApplication::QtSingleApplication(int &,char * *,bool)" (??0QtSingleApplication@@QAE@AAHPAPAD_N@Z) referenced in function _main
- 1>D:\Projects\test\test\Debug\test.exe : fatal error LNK1120: 1 unresolved externals
Who can tall, why this happen? What is I do wrong?
Code main.cpp:
- #include "test.h"
- #include "QtSingleApplication"
- int main(int argc, char *argv[])
- {
- QtSingleApplication a(argc, argv);
- test w;
- w.show();
- return a.exec();
- }
12 replies
Ok. After adding, I have a more errors: (if i add all of headers and source files “qtlocalpeer”, “qtlockedfile”, “qtsingleapplication” and “qtsinglecoreapplication”)
- 1>Linking...
- 1>qtlocalpeer.obj : error LNK2019: unresolved external symbol "__declspec(dllimport) public: __thiscall QLocalServer::QLocalServer(class QObject *)" (__imp_??0QLocalServer@@QAE@PAVQObject@@@Z) referenced in function "public: __thiscall QtLocalPeer::QtLocalPeer(class QObject *,class QString const &)" (??0QtLocalPeer@@QAE@PAVQObject@@ABVQString@@@Z)
- 1>qtlocalpeer.obj : error LNK2001: unresolved external symbol "public: virtual struct QMetaObject const * __thiscall QLocalServer::metaObject(void)const " (?metaObject@QLocalServer@@UBEPBUQMetaObject@@XZ)
- 1>qtlocalpeer.obj : error LNK2001: unresolved external symbol "public: virtual void * __thiscall QLocalServer::qt_metacast(char const *)" (?qt_metacast@QLocalServer@@UAEPAXPBD@Z)
- 1>qtlocalpeer.obj : error LNK2001: unresolved external symbol "public: virtual int __thiscall QLocalServer::qt_metacall(enum QMetaObject::Call,int,void * *)" (?qt_metacall@QLocalServer@@UAEHW4Call@QMetaObject@@HPAPAX@Z)
- 1>qtlocalpeer.obj : error LNK2001: unresolved external symbol "public: virtual bool __thiscall QLocalServer::hasPendingConnections(void)const " (?hasPendingConnections@QLocalServer@@UBE_NXZ)
- 1>qtlocalpeer.obj : error LNK2001: unresolved external symbol "public: virtual class QLocalSocket * __thiscall QLocalServer::nextPendingConnection(void)" (?nextPendingConnection@QLocalServer@@UAEPAVQLocalSocket@@XZ)
- 1>qtlocalpeer.obj : error LNK2001: unresolved external symbol "protected: virtual void __thiscall QLocalServer::incomingConnection(unsigned int)" (?incomingConnection@QLocalServer@@MAEXI@Z)
- 1>qtlocalpeer.obj : error LNK2019: unresolved external symbol "__declspec(dllimport) public: virtual __thiscall QLocalServer::~QLocalServer(void)" (__imp_??1QLocalServer@@UAE@XZ) referenced in function "public: virtual void * __thiscall QLocalServer::`scalar deleting destructor'(unsigned int)" (??_GQLocalServer@@UAEPAXI@Z)
- 1>qtlocalpeer.obj : error LNK2019: unresolved external symbol "__declspec(dllimport) public: class QString __thiscall QLocalServer::errorString(void)const " (__imp_?errorString@QLocalServer@@QBE?AVQString@@XZ) referenced in function "public: bool __thiscall QtLocalPeer::isClient(void)" (?isClient@QtLocalPeer@@QAE_NXZ)
- 1>qtlocalpeer.obj : error LNK2019: unresolved external symbol "__declspec(dllimport) public: bool __thiscall QLocalServer::listen(class QString const &)" (__imp_?listen@QLocalServer@@QAE_NABVQString@@@Z) referenced in function "public: bool __thiscall QtLocalPeer::isClient(void)" (?isClient@QtLocalPeer@@QAE_NXZ)
- 1>qtlocalpeer.obj : error LNK2019: unresolved external symbol "__declspec(dllimport) public: virtual bool __thiscall QLocalSocket::waitForReadyRead(int)" (__imp_?waitForReadyRead@QLocalSocket@@UAE_NH@Z) referenced in function "public: bool __thiscall QtLocalPeer::sendMessage(class QString const &,int)" (?sendMessage@QtLocalPeer@@QAE_NABVQString@@H@Z)
- 1>qtlocalpeer.obj : error LNK2019: unresolved external symbol "__declspec(dllimport) public: virtual bool __thiscall QLocalSocket::waitForBytesWritten(int)" (__imp_?waitForBytesWritten@QLocalSocket@@UAE_NH@Z) referenced in function "public: bool __thiscall QtLocalPeer::sendMessage(class QString const &,int)" (?sendMessage@QtLocalPeer@@QAE_NABVQString@@H@Z)
- 1>qtlocalpeer.obj : error LNK2019: unresolved external symbol "__declspec(dllimport) public: virtual __thiscall QLocalSocket::~QLocalSocket(void)" (__imp_??1QLocalSocket@@UAE@XZ) referenced in function "public: bool __thiscall QtLocalPeer::sendMessage(class QString const &,int)" (?sendMessage@QtLocalPeer@@QAE_NABVQString@@H@Z)
- 1>qtlocalpeer.obj : error LNK2019: unresolved external symbol "__declspec(dllimport) public: bool __thiscall QLocalSocket::waitForConnected(int)" (__imp_?waitForConnected@QLocalSocket@@QAE_NH@Z) referenced in function "public: bool __thiscall QtLocalPeer::sendMessage(class QString const &,int)" (?sendMessage@QtLocalPeer@@QAE_NABVQString@@H@Z)
- 1>qtlocalpeer.obj : error LNK2019: unresolved external symbol "__declspec(dllimport) public: void __thiscall QLocalSocket::connectToServer(class QString const &,class QFlags<enum QIODevice::OpenModeFlag>)" (__imp_?connectToServer@QLocalSocket@@QAEXABVQString@@V?$QFlags@W4OpenModeFlag@QIODevice@@@@@Z) referenced in function "public: bool __thiscall QtLocalPeer::sendMessage(class QString const &,int)" (?sendMessage@QtLocalPeer@@QAE_NABVQString@@H@Z)
- 1>qtlocalpeer.obj : error LNK2019: unresolved external symbol "__declspec(dllimport) public: __thiscall QLocalSocket::QLocalSocket(class QObject *)" (__imp_??0QLocalSocket@@QAE@PAVQObject@@@Z) referenced in function "public: bool __thiscall QtLocalPeer::sendMessage(class QString const &,int)" (?sendMessage@QtLocalPeer@@QAE_NABVQString@@H@Z)
- 1>D:\Projects\test\test\Debug\test.exe : fatal error LNK1120: 16 unresolved externals
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 must log in to post a reply. Not a member yet? Register here!



