Message 1 of 5
- Mark as New
- Bookmark
- Subscribe
- Mute
- Subscribe to RSS Feed
- Permalink
- Report
hello I am using vsto2019(compile platform vsto2017), however I cannot use the AcGeMatrix3d class, I always get errors when compiling the code. This is the code I use
//register function test
static void scaleEntity(); extern void test() { scaleEntitye(); } //Try compiling the code static void scaleEntity() { ADSN adent; acdbEntLast(adent); ID is = IDNULL; acdbGetObjectId(is, adent); AcDbObjectIdArray mas; mas.append(is); ads_point pPoint; double scaleCoef = 2.0; AcGeMatrix3d m; m.setToScaling(scaleCoef, AcGePoint3d(pPoint[X], pPoint[Y], pPoint[Z])); //continue code
... }
This is the error I receive,
Error LNK2019 unresolved external symbol "public: class AcGeMatrix3d & __cdecl AcGeMatrix3d::setToScaling(double,class AcGePoint3d const &)" (?setToScaling@AcGeMatrix3d@@QEAAAEAV1@NAEBVAcGePoint3d@@@Z) referenced in function "void __cdecl scaleEntitye(void)" (?scaleEntitye@@YAXXZ) Error LNK2019 unresolved external symbol "public: __cdecl AcGeMatrix3d::AcGeMatrix3d(void)" (??0AcGeMatrix3d@@QEAA@XZ) referenced in function "void __cdecl scaleEntitye(void)" (?scaleEntitye@@YAXXZ)
If I didn't declare the prototype code static void scaleEntity () and call another function or call scaleEntity but remove these code related AcGeMatrix3d
AcGeMatrix3d m; m.setToScaling(scaleCoef, AcGePoint3d(pPoint[X], pPoint[Y], pPoint[Z]));
then the code compiles normally.
I tried changing the runtime library in properties but it still didn't work.
Please help, thanks a lot!
Solved! Go to Solution.