- 积分
- 316
- 明经币
- 个
- 注册时间
- 2004-4-6
- 在线时间
- 小时
- 威望
-
- 金钱
- 个
- 贡献
-
- 激情
-
|
最近编了几个有关CAD数据库操作的程序,结果都是出现同样的错误,提示为:
E:\xgh\VC工程\OperateDb\OperateDb.cpp(209) : error C2601: 'initApp' : local function definitions are illegal E:\xgh\VC工程\OperateDb\OperateDb.cpp(235) : error C2601: 'unloadApp' : local function definitions are illegal E:\xgh\VC工程\OperateDb\OperateDb.cpp(241) : error C2598: linkage specification must be at global scope E:\xgh\VC工程\OperateDb\OperateDb.cpp(242) : error C2601: 'acrxEntryPoint' : local function definitions are illegal E:\xgh\VC工程\OperateDb\OperateDb.cpp(258) : fatal error C1004: unexpected end of file found
有关的代码是:
void initApp(){ acedRegCmds->addCommand ("OPERATEDB_COMMAND", "CREATEDB", "CREATEDB", ACRX_CMD_MODAL, createDb); } void unloadApp(){ acedRegCmds->removeGroup("OPERATEDB_COMMAND"); acedRegCmds->removeGroup("LongTransaction_COMMAND"); } extern"C" AcRx::AppRetCode acrxEntryPoint(AcRx::AppMsgCode msg, void* appid) { switch (msg) { case AcRx::kInitAppMsg: acrxDynamicLinker->unlockApplication(appid); acrxDynamicLinker->registerAppMDIAware(appid); initApp(); break; case AcRx::kUnloadAppMsg: unloadApp(); break; default: break; } return AcRx::kRetOK; }
而这些函数我都在前面声明了啊,这是怎么回事啊????
请高手指教,谢谢! |
|