Bonjour,
J'ai toujours un problème avec ma dll : Je veut redéfinir des opérateurs et les surcharger.
Avec devc++, j'ai donc mit :
Code : Sélectionner tout - Visualiser dans une fenêtre à part
1
2
3
4
5
6
7
8
9
10
11
12
13
14
15
16
17
18
19
20
21
22
23
24
25
26
27
 
//Point.h
DLLIMPORT class Point2d : public Point
{
    public:
      //...
      DLLIMPORT virtual bool operator== (Point & Obj);
      DLLIMPORT virtual bool operator== (Point2d & Obj);
      DLLIMPORT virtual bool operator== (Point3d & Obj);
      DLLIMPORT virtual Point2d & operator++ ();
      DLLIMPORT virtual Point2d & operator++ (int);
      //...
}
//Point.cpp [Exporter]
bool Abl::Point::operator== (Point & Obj)
{
  return x == Obj.x;
}
bool Abl::Point::operator== (Point2d & Obj)
{
  return x == Obj.x;
}
bool Abl::Point::operator== (Point3d & Obj)
{
  return x == Obj.x;
}
//...
mais si je vuet utiliser par exemple :
P1 == P2;
J'obtien le méssage d'éreur [Linker error] undefined reference to `vtable for Abl:oint'