habe schon gegoogelt, aber nix gefunden zu folgender fehlermeldung:
error LNK2005: _acrxEntryPoint already defined in acrxEntryPoint.obj
Code:
----------------------------------------------------------------
#include "stdafx.h"
#include <aced.h>
#include <rxregsvc.h>
#include <acutads.h>
#include <tchar.h>
void initApp();
void unloadApp();
void helloWorld();
void initApp()
{
// register a command with the AutoCAD command mechanism
acedRegCmds->addCommand(_T("HELLOWORLD_COMMANDS"),_T("Hello"),_T("Bonjour"),ACRX_CMD_MODAL,helloWorld);
acutPrintf(_T("%s%s"), _T("Inside InitApp - "), _T("Registering commands with acedRegCmds\n"));
acutPrintf(_T("Enter \"HELLO\" at the command prompt to execute.\n"));
}
void unloadApp()
{
acedRegCmds->removeGroup(_T("HELLOWORLD_COMMANDS"));
acutPrintf(_T("%s%s"), _T("Goodbye\n"), _T("Removing command group \"HELLO_COMMANDS\"\n"));
}
void helloWorld()
{
acutPrintf(_T("\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;
case AcRx::kLoadDwgMsg:
acutPrintf(_T("Received Acrx::kLoadDwgMsg\n"));
break;
default:
break;
}
return AcRx::kRetOK;
}
------------------
MfG
Frank
Eine Antwort auf diesen Beitrag verfassen (mit Zitat/Zitat des Beitrags) IP