- UID
- 275579
- 积分
- 0
- 精华
- 贡献
-
- 威望
-
- 活跃度
-
- D豆
-
- 在线时间
- 小时
- 注册时间
- 2005-6-11
- 最后登录
- 1970-1-1
|
马上注册,结交更多好友,享用更多功能,让你轻松玩转社区。
您需要 登录 才可以下载或查看,没有账号?立即注册
×
我刚学ARX
按照Object2005上的例子为什么编译错误
这是第一个例子
/////////////
ArxProject.def
////////////
LIBRARY Step01
EXPORTS
acrxEntryPoint PRIVATE
acrxGetApiVersion PRIVATE
/////////
HelloWorld.cpp
////////
#include "stdafx.h"
#include <aced.h>
#include <rxregsvc.h>
void initApp();
void unloadApp();
void helloWorld();
void initApp()
{
// register a command with the AutoCAD command mechanism
acedRegCmds->addCommand("HELLOWORLD_COMMANDS",
"Hello",
"Bonjour",
ACRX_CMD_TRANSPARENT,
helloWorld);
}
void unloadApp()
{
acedRegCmds->removeGroup("HELLOWORLD_COMMANDS");
}
void helloWorld()
{
acutPrintf("\nHello World!");
}
extern "C" AcRx::AppRetCode
acrxEntryPoint(AcRx::AppMsgCode msg, void* pkt)
{
switch (msg)
{
case AcRx::kInitAppMsg:
acrxDynamicLinker->unlockApplication(pkt);
acrxRegisterAppMDIAware(pkt);
initApp();
break;
case AcRx::kUnloadAppMsg:
unloadApp();
break;
default:
break;
}
return AcRx::kRetOK;
}
/////////
Step01.cpp
///////
// Step01.cpp : Defines the entry point for the DLL application.
//
#include "stdafx.h"
BOOL APIENTRY DllMain( HANDLE hModule,
DWORD ul_reason_for_call,
LPVOID lpReserved
)
{
return TRUE;
}
//////////
stdafx.h
//////////
// stdafx.cpp : source file that includes just the standard includes
// Step01.pch will be the pre-compiled header
// stdafx.obj will contain the pre-compiled type information
#include "stdafx.h"
// TODO: reference any additional headers you need in STDAFX.H
// and not in this file
/////////
stdafx.h
/////////
// stdafx.h : include file for standard system include files,
// or project specific include files that are used frequently, but
// are changed infrequently
//
#pragma once
#define WIN32_LEAN_AND_MEAN // Exclude rarely-used stuff from Windows headers
// Windows Header Files:
#include <windows.h>
// TODO: reference additional headers your program requires here |
|