关于用dbx自定义类的问题,请大家赐教!
www.dimcax.com
关于用dbx自定义类的问题,请大家赐教!
小弟按以下方法自定义类,但是编译时老是出现连接错误,请知道的大侠不吝赐教!
1. 新建project,项目文件名称 entitytest,选择arx程序;
2. 新建project,项目文件名称 centity选择add to current workspace和objectdbx(custom object definition);
3. 用class wizard添加自定义类cascocentity,包括函数和变量的定义[附件中只在worlddraw(acgiworlddraw* mode)中有修改];
4. 在上级entitytest目录的 entitytest.cpp 文件中添加initapplication()中的dbx加载信息[acrxloadmodule("cascocentity.dbx", 0);],和unloadapplication()中的dbx卸载信息[acrxunloadmodule("cascocentity.dbx");]。
5. 在上级entitytest目录的stdarx.h中添加新定义类的#include "..\entitytest\centity\cascocentity.h" 文件说明。
6. 在entitytest项目的setting菜单中选link页面,输入对象的centity/debug/cascocentity.lib。
7. 至此,在原有的entitytest中就可以使用新定义的cascocentity类了。
具体应用过程中,报错如下:
dkfymyclass是我自己定义的类名