明经CAD社区

 找回密码
 注册

QQ登录

只需一步,快速开始

搜索
查看: 1877|回复: 2

紧急求助!

[复制链接]
发表于 2003-2-4 03:41:00 | 显示全部楼层 |阅读模式
由于程序中计算公式的日益庞大,最近本人想将原来用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::operator 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::operator 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)

请各位大虾拉我一把,先谢!
发表于 2003-2-6 13:39:00 | 显示全部楼层

你连接的库文件不全

从出错信息看,你连接的库文件不全或连接库路径不正确.作为一个
C程序员,这类错误是非常常见也非常容易解决的,看来你是一位C新手.
发表于 2003-2-8 12:52:00 | 显示全部楼层

你可以这样连接库文件

说实话,VC库文件连接设置并不是一件很容易的工作,不过ObjectARXWiz向导可以帮助你做这些事。
在你下载的ARX中应该的这样的目录:ObjectARX xxxx/utils/ObjARXWiz,在未启动VC时,运行其中的WizardSetup.exe,然后启动VC,新建文件选项中会多一个ObjectARX应用程序项目,选择它并根据你的程序需要按照向导建立工程。在向导添加的"工程名.cpp"文件尾添加代码,这样一般不会出现连接库文件缺少错误。
您需要登录后才可以回帖 登录 | 注册

本版积分规则

小黑屋|手机版|CAD论坛|CAD教程|CAD下载|联系我们|关于明经|明经通道 ( 粤ICP备05003914号 )  
©2000-2023 明经通道 版权所有 本站代码,在未取得本站及作者授权的情况下,不得用于商业用途

GMT+8, 2024-11-29 05:05 , Processed in 0.174174 second(s), 24 queries , Gzip On.

Powered by Discuz! X3.4

Copyright © 2001-2021, Tencent Cloud.

快速回复 返回顶部 返回列表