Hey so i am attempting to build the next member Functors of sophistication ConcavePolygon, and i am getting Linker Exterior symbol error for whatever reason:

conflicting exterior symbol "public: virtual void __thiscall sf::ConcavePolygon::Partition::RunAlgorithm(class TPPLPoly &lifier,class std::list > &lifier)"

Transpire ended up being to just make a category that holds graphical data that SFML (lib) can understand, and processes either to Partition or Triangulate the graphical data(Polygon(s))

Rather than writing two large functions with Much the same code someone to Triangulate, and something to complete things i call Convexulating, I made the decision attempt dealing with functors, making the bottom functor Partition, with Descendents Triangulate and Convexulate.

The bottom class Partition consists of only two functions:

  • The Constructor which consists of all of the functionality
  • The RunAlgorithm function(seperated in the constructor so it may be overloaded by descendents)

I figure the mistake has something related to the virtual RunAlgorithm function because it is relied on through the Constructor, yet i am speculating it's made invalid in some way by descendents.

Exactly what do i actually do to attain transpire or fix this?

Here's the code:

class ConcavePolygon : public Body{ 
protected:
    std::list<Vector2f> SFMLPoints;
    std::vector <TPPLPoint> TPPLPoints; //TODO: figure out how to make a temp version without Memory Exception

public:
//////////////////// Partitioning/Triangulating Classes /////////////////////////////////////////////////////////////
    class Partition{
    public:
        virtual void RunAlgorithm(TPPLPoly& Poly, std::list<TPPLPoly>& PartitionOutput);

        Partition(){};
        Partition(ConcavePolygon* Poly, Vector2f* Points, long numbPoints){ //TODO turn this into a base class for triangulate or Convexulate

        //rev up all the needed data structs
        std::list<TPPLPoly> PartitionOutput;
        std::list <TPPLPoly> ::iterator I;

        //Backup the points, and convert them to tppl
        for(int I=0; I<numbPoints; I++){
            Poly->TPPLPoints.push_back(TPPLPoint(Points[I].x, Points[I].y));
            Poly->SFMLPoints.push_back(Points[I]);}
        TPPLPoly TempPoly(&Poly->TPPLPoints[0], numbPoints, false);

        //clear everything to be filled with the Partition Algorithm
        Poly->Clear();

        // Run the Partitioning Algorithm (This is an abstract funtion, and is overloaded)
        RunAlgorithm(TempPoly, PartitionOutput);

        // Convert results to SFML points, shapes, and add to the body
        for( I= PartitionOutput.begin(); I!= PartitionOutput.end();I++){
            sf::Shape TempShape;
            for(int i=0; i< I->GetNumPoints(); i++)
                TempShape.AddPoint( I->GetPoint(i).x, I->GetPoint(i).y);
            Poly->AddShape(TempShape);
        }
    };
};

    class Convexulate: public Partition{
    public:
        Convexulate(ConcavePolygon* Poly, Vector2f* Points, long numbPoints){
            Partition(Poly, Points, numbPoints);};

        void RunAlgorithm(TPPLPoly& Poly, std::list<TPPLPoly>& PartitionOutput){
            TPPLPartition Partition;
            Partition.ConvexPartition_OPT(&Poly, &PartitionOutput);
        };
    };

    class Triangulate: public Partition{
    public:
        Triangulate(ConcavePolygon* Poly, Vector2f* Points, long numbPoints){
            Partition(Poly, Points, numbPoints);};

        void RunAlgorithm(TPPLPoly& Poly, std::list<TPPLPoly>& PartitionOutput){
            TPPLPartition Partition;
            Partition.Triangulate_OPT(&Poly, &PartitionOutput);
        };
    };

//////////////////////  Constructors    /////////////////////////////////////////////////////
    ConcavePolygon(Vector2f* Points, long numbPoints){
        Convexulate(this,Points, numbPoints);
    };


};// ConcavePolygon Class

Either possess a method body for virtual void RunAlgorithm() within the inner class Partition or declare it as being pure virtual:

virtual void RunAlgorithm(TPPLPoly& Poly, std::list<TPPLPoly>& PartitionOutput) = 0;

There's a unique situation that, any virtual function can't ever remain unimplemented when that class or its child objects are declared (despite the fact that the work as such not used).