|
由于程序中计算公式的日益庞大,最近本人想将原来用Vlisp开发的一个程序用ObjectARX改写,就找了一本ARX的书,调试了其中一个程序,编译都通过了,可连接却出了10个错误。
源程如下:
void CrCircle(void)
{
AcDbBlockTable *pBlockTable;
AcGePoint3d center(50.0,70.0,0.0);
AcGeVector3d normal(0.0,0.0,1.0);
AcDbCircle *pCircle = new AcDbCircle(center,normal,90.0);
acdbHostApplicationServices()->workingDatabase()
->getSymbolTable(pBlockTable, AcDb::kForRead);
AcDbBlockTableRecord*pBlockTableRecord;
pBlockTable->getAt(ACDB_MODEL_SPACE,pBlockTableRecord,AcDb::kForWrite);
pBlockTable->close();
AcDbObjectId circleId;
pBlockTableRecord->appendAcDbEntity(circleId,pCircle);
pBlockTableRecord->close();
pCircle->close();
}
出错内容:
CG.CPP
ARX.CPP
Linking...
Creating library Debug/Conic.lib and object Debug/Conic.exp
Conic.exp : warning LNK4070: /OUT:CG.arx directive in .EXP differs from output filename "Debug/Conic.arx"; ignoring directive
CG.OBJ : error LNK2001: unresolved external symbol "public: static void __cdecl AcDbObject:perator delete(void *)" (??3AcDbObject@@SAXPAX@Z)
CG.OBJ : error LNK2001: unresolved external symbol "public: enum Acad::ErrorStatus __thiscall AcDbBlockTableRecord::appendAcDbEntity(class AcDbObjectId &,class AcDbEntity *)" (?appendAcDbEntity@AcDbBlockTableRecord@@QAE?AW4ErrorStatus@Acad@@AAVAcDb
ObjectId@@PAVAcDbEntity@@@Z)
CG.OBJ : error LNK2001: unresolved external symbol "public: enum Acad::ErrorStatus __thiscall AcDbObject::close(void)" (?close@AcDbObject@@QAE?AW4ErrorStatus@Acad@@XZ)
CG.OBJ : error LNK2001: unresolved external symbol "public: enum Acad::ErrorStatus __thiscall AcDbBlockTable::getAt(char const *,class AcDbBlockTableRecord * &,enum AcDb::OpenMode,bool)const " (?getAt@AcDbBlockTable@@QBE?AW4ErrorStatus@Acad@@PBDAAP
AVAcDbBlockTableRecord@@W4OpenMode@AcDb@@_N@Z)
CG.OBJ : error LNK2001: unresolved external symbol "public: enum Acad::ErrorStatus __thiscall AcDbDatabase::getSymbolTable(class AcDbBlockTable * &,enum AcDb::OpenMode)" (?getSymbolTable@AcDbDatabase@@QAE?AW4ErrorStatus@Acad@@AAPAVAcDbBlockTable@@W
4OpenMode@AcDb@@@Z)
CG.OBJ : error LNK2001: unresolved external symbol "public: __thiscall AcDbCircle::AcDbCircle(class AcGePoint3d const &,class AcGeVector3d const &,double)" (??0AcDbCircle@@QAE@ABVAcGePoint3d@@ABVAcGeVector3d@@N@Z)
CG.OBJ : error LNK2001: unresolved external symbol "public: static void * __cdecl AcDbObject:perator new(unsigned int)" (??2AcDbObject@@SAPAXI@Z)
CG.OBJ : error LNK2001: unresolved external symbol "__declspec(dllimport) public: __thiscall AcGeVector3d::AcGeVector3d(double,double,double)" (__imp_??0AcGeVector3d@@QAE@NNN@Z)
CG.OBJ : error LNK2001: unresolved external symbol "__declspec(dllimport) public: __thiscall AcGePoint3d::AcGePoint3d(double,double,double)" (__imp_??0AcGePoint3d@@QAE@NNN@Z)
Debug/Conic.arx : fatal error LNK1120: 9 unresolved externals
Error executing link.exe.
Conic.arx - 10 error(s), 1 warning(s)
请各位大虾拉我一把,先谢! |
|