Advertisement
Not a member of Pastebin yet?
Sign Up,
it unlocks many cool features!
- ---------------------
- *** Main Project ***
- ---------------------
- ->This project generate .exe file
- mainProject.h
- -------------
- class MainProjectHeder{
- virtual void foo() = 0; // this function is work
- void foo1(); // this function giving me error like unresolved external symbol
- void foo2{ // this work
- print("hello");
- };
- };
- void MainProjectHeder::foo1(){
- print("function not working");
- }
- ExperimentFactoryInterface.h
- ----------------------------
- #include <MainProjectHeder.h>
- class ExperimentFactoryInterface {
- public:
- virtual ~ExperimentFactoryInterface() {}
- virtual MainProjectHeder* CreateExperiment(const QVariant& = QVariant()) = 0;
- };
- ----------------------
- *** Pulgin code ***
- ----------------------
- ->This Project is generate DLL file
- Experiment.h
- -------------
- #include <mainProject.h>
- class Experiment : public MainProjectHeder{
- virtual void foo();
- };
- void Experiment:foo(){
- print("work fine");
- }
- Factory.h
- ----------
- #include "cyclicvoltammetry.h"
- #include <ExperimentFactoryInterface.h>
- class Factory : public ExperimentFactoryInterface {
- public:
- MainProjectHeder* CreateExperiment(const QVariant& = QVariant());
- };
- MainProjectHeder* Factory::CreateExperiment(const QVariant&) {
- return new Experiment;
- }
Advertisement
Add Comment
Please, Sign In to add comment
Advertisement