Hi everyone.I had to make a dll from my current source to use in C#.I did it with QAxfactory and Qt 4.8.6 and made a dll and used in C# but when I set target build to 64 bit in vs studio my C# program cannot start because my dll(that I have built from my qt source) was 32 bit.I compiled my qt program 64 bit and made 64 bit dll but when I want to add it as COM component(I register it with Regsvr32.exe) it gives me this error :Self registration for d:\.......dll faild.I compiled it with qt 5.2.1 and the result was the same.What should I do???
Qt Code:
  1. #ifndef OBJECTS_H
  2. #define OBJECTS_H
  3.  
  4. #include <QWidget>
  5. #include <QColor>
  6. QT_BEGIN_NAMESPACE
  7. QT_END_NAMESPACE
  8. class QSubWidget;
  9. class CirclesGraphicsScene;
  10. class CirclesGraphicsView;
  11. //! [0]
  12. class Circles : public QWidget
  13. {
  14. Q_OBJECT
  15. Q_CLASSINFO("ClassID", "{d574a747-8016-46db-a07c-b2b4854ee75c}")
  16. Q_CLASSINFO("InterfaceID", "{4a30719d-d9c2-4659-9d16-67378209f822}")
  17. Q_CLASSINFO("EventsID", "{4a30719d-d9c2-4659-9d16-67378209f823}")
  18. Q_PROPERTY(QColor backgroundColor READ backgroundColor WRITE setBackgroundColor)
  19. Q_PROPERTY(int circleNumber READ circleNumber WRITE setCircleNumber)
  20.  
  21. void createScene();
  22. public:
  23. Circles(QWidget *parent = 0);
  24.  
  25. QSize sizeHint() const;
  26. QColor backgroundColor()const;
  27. int circleNumber()const{return _n;}
  28.  
  29. public slots:
  30.  
  31. //--general
  32. void setBackgroundColor(QColor color);
  33. void setCircleNumber(int n);
  34.  
  35. //--axes
  36. void setAxesPen(QColor color, int w , int penStyle);
  37.  
  38. //--circles
  39. void addCircles(int r, int n, int s, int e);
  40.  
  41. ........//the rest
To copy to clipboard, switch view to plain text mode