im trying to test a plugin based application... so as u know i have an interface and then a plug-in which manipulate the interface... i think everything is OK but i face with this error>>
( error: Undefined interface)
. here is my code... how knows wahts the problem
//// pro file
#-------------------------------------------------
#
# Project created by QtCreator 2012-08-11T13:34:07
#
#-------------------------------------------------
QT += core
QT -= gui
TARGET = CAlPlugin_Based
CONFIG += console
CONFIG -= app_bundle
TEMPLATE = app
SOURCES += main.cpp
HEADERS += \
EvaluateInterface.h\
Evaluate.h
//// Evaluate.h file
#ifndef EVALUATE_H
#define EVALUATE_H
#include<EvaluateInterface.h>
class evaluate : public evaluateInterface
{
Q_OBJECT
Q_INTERFACES(evaluateInterface)
public:
QString name1() const;
int evaluate1(int num1, int num2) const;
};
#endif // EVALUATE_H
//// EvaluateInterface.h
#ifndef EVALUATEINTERFACE_H
#define EVALUATEINTERFACE_H
class evaluateInterface
{
public:
virtual ~evaluateInterface(){}
virtual QString name1() const=0;
virtual int evaluate1(int num1,int num2) const=0;
};
Q_DECLARE_INTERFACE(evaluateInterface,"CaaaalInter face/1.0")
#endif // EVALUATEINTERFACE_H
Whats the problem then... thank u alll
Bookmarks