- UID
- 766628
- 积分
- 16
- 精华
- 贡献
-
- 威望
-
- 活跃度
-
- D豆
-
- 在线时间
- 小时
- 注册时间
- 2017-3-2
- 最后登录
- 1970-1-1
|
马上注册,结交更多好友,享用更多功能,让你轻松玩转社区。
您需要 登录 才可以下载或查看,没有账号?立即注册
×
自定义实体名字是TriangleEntityDB,编译以后出现这个错误,
1>DwgDatabaseUtil.obj : warning LNK4248: 无法解析 typeref 标记(01000022)(为“AcDbStub”);映像可能无法运行
1>ZfgkTriangle.obj : warning LNK4248: 无法解析 typeref 标记(0100001C)(为“AcGeFastTransform”);映像可能无法运行
1>ConvertUtil.obj : error LNK2028: 无法解析的标记(0A00002F) "extern "C" int __cdecl acedTrans(double const * const,struct resbuf const *,struct resbuf const *,int,double * const)" (?acedTrans@@$$J0YAHQBNPBUresbuf@@1HQAN@Z),该标记在函数 "public: static class AcGePoint3d __cdecl CConvertUtil::WcsToDcsPoint(class AcGePoint3d const &)" (?WcsToDcsPoint@CConvertUtil@@$$FSA?AVAcGePoint3d@@ABV2@@Z) 中被引用
1>ConvertUtil.obj : error LNK2019: 无法解析的外部符号 "extern "C" int __cdecl acedTrans(double const * const,struct resbuf const *,struct resbuf const *,int,double * const)" (?acedTrans@@$$J0YAHQBNPBUresbuf@@1HQAN@Z),该符号在函数 "public: static class AcGePoint3d __cdecl CConvertUtil::WcsToDcsPoint(class AcGePoint3d const &)" (?WcsToDcsPoint@CConvertUtil@@$$FSA?AVAcGePoint3d@@ABV2@@Z) 中被引用
1>Debug/ZfgkTriangleEntityDB.dll : fatal error LNK1120: 2 个无法解析的外部命令
第二个错误应该是这个函数里的
Acad::ErrorStatus ZfgkTriangle::getOsnapPoints (
AcDb::OsnapMode osnapMode,
int gsSelectionMark,
const AcGePoint3d & pickPoint,
const AcGePoint3d & lastPoint,
const AcGeFastTransform & viewXform,
AcGePoint3dArray &snapPoints,
AcDbIntArray &geomIds,
const AcGeMatrix3d &insertionMat) const
{
assertReadEnabled () ;
return (AcDbEntity::getOsnapPoints (osnapMode, gsSelectionMark, pickPoint, lastPoint, viewXform, snapPoints, geomIds, insertionMat)) ;
}
第三个似乎是说的这里
AcGePoint3d CConvertUtil::UcsToWcsPoint( const AcGePoint3d &point )
{
// 转换成世界坐标
AcGePoint3d pt;
struct resbuf rbFrom, rbTo;
rbFrom.restype = RTSHORT;
rbFrom.resval.rint = 1; // from UCS
rbTo.restype = RTSHORT;
rbTo.resval.rint = 0; // to WCS
acedTrans(asDblArray(point), &rbFrom, &rbTo, Adesk::kFalse, asDblArray(pt));
return pt;
}
这些代码都是从书上拷贝下来的,另外还有一些错误似乎是因为运行向导时选中了托管的选项,是不是我的工程设置有问题,请大家帮忙看看
|
|