Advertisement
Guest User

Untitled

a guest
Jun 19th, 2019
152
0
Never
Not a member of Pastebin yet? Sign Up, it unlocks many cool features!
text 1.31 KB | None | 0 0
  1. ---------------------
  2. *** Main Project ***
  3. ---------------------
  4. ->This project generate .exe file
  5.  
  6. mainProject.h
  7. -------------
  8. class MainProjectHeder{
  9.  
  10. virtual void foo() = 0; // this function is work
  11. void foo1(); // this function giving me error like unresolved external symbol
  12. void foo2{ // this work
  13. print("hello");
  14. };
  15. };
  16.  
  17. void MainProjectHeder::foo1(){
  18. print("function not working");
  19. }
  20.  
  21.  
  22. ExperimentFactoryInterface.h
  23. ----------------------------
  24. #include <MainProjectHeder.h>
  25.  
  26. class ExperimentFactoryInterface {
  27. public:
  28. virtual ~ExperimentFactoryInterface() {}
  29. virtual MainProjectHeder* CreateExperiment(const QVariant& = QVariant()) = 0;
  30. };
  31.  
  32.  
  33.  
  34. ----------------------
  35. *** Pulgin code ***
  36. ----------------------
  37. ->This Project is generate DLL file
  38.  
  39. Experiment.h
  40. -------------
  41.  
  42. #include <mainProject.h>
  43. class Experiment : public MainProjectHeder{
  44.  
  45. virtual void foo();
  46. };
  47.  
  48. void Experiment:foo(){
  49. print("work fine");
  50. }
  51.  
  52.  
  53. Factory.h
  54. ----------
  55. #include "cyclicvoltammetry.h"
  56. #include <ExperimentFactoryInterface.h>
  57.  
  58. class Factory : public ExperimentFactoryInterface {
  59. public:
  60. MainProjectHeder* CreateExperiment(const QVariant& = QVariant());
  61. };
  62.  
  63.  
  64. MainProjectHeder* Factory::CreateExperiment(const QVariant&) {
  65. return new Experiment;
  66. }
Advertisement
Add Comment
Please, Sign In to add comment
Advertisement