all I'm trying to create ActiveX server with Qt5.2.0. According to some pieces of information I have, to create a simple ActiveX server (which exports one object) it's enough to:
have such .pro file
TEMPLATE = lib CONFIG += dll axserver TARGET = simpleServer greaterThan(QT_MAJOR_VERSION, 4): QT += widgets QT += core RC_FILE = qaxserver.rc DEF_FILE = qaxserver.def HEADERS += myserver.h SOURCES += main.cpp SOURCES += myserver.cpp
have such main.cpp file
#include "ActiveQt/QAxFactory"
#include "myserver.h"
QAXFACTORY_DEFAULT( MyServer, 5 id's )
the class should inherit
QWidget
andQAxBindable
there should be file
qaxserver.rc
. in my case it's content is1 TYPELIB "simpleServer.pro"
there should be fie
qaxserver.def
with default contents:; mfc_test.def : Declares the module parameters. EXPORTS DllCanUnloadNow PRIVATE DllGetClassObject PRIVATE DllRegisterServer PRIVATE DllUnregisterServer PRIVATE DumpIDL PRIVATE
the problem is that these 5 names are undefined for Visual Studio's linker. How to solve the problem?
the error is:
error LNK2001: unresolved external symbol DllCanUnloadNow