I keep getting the following link error on Visual Studio C++ 2010 Express,
shape.obj : error LNK2019: unresolved external symbol "class std::vector<class rectangle,class std::allocator<class rectangle> > __cdecl rectangleIzer::rectanglizePolygon(class std::vector<class rectangleIzer::myPoint,class std::allocator<class rectangleIzer::myPoint> >)" (?rectanglizePolygon@rectangleIzer@@YA?AV?$vector@Vrectangle@@V?$allocator@Vrectangle@@@std@@@std@@V?$vector@VmyPoint@rectangleIzer@@V?$allocator@VmyPoint@rectangleIzer@@@std@@@3@@Z) referenced in function "public: class std::vector<class rectangle,class std::allocator<class rectangle> > * __thiscall rectangleIzer::shape::rectanglizeCutouts(void)" (?rectanglizeCutouts@shape@rectangleIzer@@QAEPAV?$vector@Vrectangle@@V?$allocator@Vrectangle@@@std@@@std@@XZ)
Rectangle.h
#ifndef RECTANGLE_H
#define RECTANGLE_H
#include "myPoint.h"
using namespace std;
using namespace rectangleIzer;
class rectangle {
private:
myPoint topLeft;
myPoint bottomRight;
public:
rectangle(){}
rectangle(myPoint, myPoint);
rectangle(float, float, float, float);
myPoint getTopLeft() {return topLeft;}
myPoint getBottomRight() {return bottomRight;}
static float min(float a, float b) {
if (a < b)
return a;
else
return b;
}
static float max(float a, float b) {
if (a > b )
return a;
else
return b;
}
};
#endif
Shape.h
#ifndef SHAPE_H
#define SHAPE_H
#include <vector>
#include "myPoint.h"
#include "rectangle.h"
using namespace std;
using namespace rectangleIzer;
namespace rectangleIzer {
class shape {
private:
vector<myPoint> chaincode;
public:
shape() {}
shape(vector<myPoint> chain) {chaincode = chain;}
void getExtends(rectangle**);
vector<rectangle>* rectanglizeCutouts();
};
}
#endif