Тема: error C2601: 'acrxEntryPoint' : local function definitions are illegal
Добрый день. Проблема в следующем. В силу малого опыта не получается найти ошибку, перелопатил кучу литературы, но видимо что-то проглядел. Есть такая прога
#include <aced.h>
#include <adscodes.h>
#include <rxregsvc.h>
#include <adesk.h>
void CorpusCH1(){
int dlCH1,shCH1;
int a1=124,b1=35,c1=15,d1=35,e1=60,f1=25;
acedGetInt (L"\nВведите длинну dl",&dlCH1);
acedGetInt (L"\nВведите ширину sh",&shCH1);
ads_point p1,CH1p2t,CH1p2b,CH1p3t,CH1p3b,CH1p4t,CH1p4b,CH1p5t,CH1p5b,CH1p6t,CH1p6b,CH1p7t,CH1p7b,p2;
acedGetPoint (NULL,L"\n Введите точку p1",p1);
CH1p2t[0]=p1[0];CH1p2t[1]=p1[1]+a1/2;CH1p2t[2]=0;
CH1p2b[0]=p1[0];CH1p2b[1]=p1[1]-a1/2;CH1p2b[2]=0;
CH1p3t[0]=p1[0]+b1;CH1p3t[1]=p1[1]+a1/2;CH1p3t[2]=0;
CH1p3b[0]=p1[0]+b1;CH1p3b[1]=p1[1]-a1/2;CH1p3b[2]=0;
CH1p4t[0]=CH1p3b[0];CH1p4t[1]=p1[1]+shCH1/2;CH1p4t[2]=0;
CH1p4b[0]=CH1p3b[0];CH1p4b[1]=p1[1]-shCH1/2;CH1p4b[2]=0;
CH1p5t[0]=CH1p4b[0]+c1;CH1p5t[1]=p1[1]+shCH1/2;CH1p5t[2]=0;
CH1p5b[0]=CH1p4b[0]+c1;CH1p5b[1]=p1[1]-shCH1/2;CH1p5b[2]=0;
CH1p6t[0]=CH1p5b[0];CH1p6t[1]=CH1p5t[1]-d1;CH1p6t[2]=0;
CH1p6b[0]=CH1p5b[0];CH1p6b[1]=CH1p5b[1]+d1;CH1p6b[2]=0;
CH1p7t[0]=CH1p6t[0]-f1;CH1p7t[1]=CH1p6t[1];CH1p7t[2]=0;
CH1p7b[0]=CH1p6b[0]-f1;CH1p7b[1]=CH1p6b[1];CH1p7b[2]=0;
p2[0]=CH1p7b[0];p2[1]=CH1p7b[1]+e1/2;p2[2]=0;
acedCommand(RTSTR,"_PLINE",RT3DPOINT,p1,RT3DPOINT,CH1p2t,RT3DPOINT,CH1p2b,RT3DPOINT,CH1p3t,RT3DPOINT,CH1p3b,
RT3DPOINT,CH1p4t,RT3DPOINT,CH1p4b,RT3DPOINT,CH1p5t,RT3DPOINT,CH1p5b,RT3DPOINT,CH1p6t,RT3DPOINT,CH1p6b,RT3DPOINT,CH1p7t,
RT3DPOINT,CH1p7b,RT3DPOINT,p2,RTSTR,"",0);}
void initApp(){
acedRegCmds->addCommand(L"Group1",L"CorpusCH1",L"CH1",ACRX_CMD_TRANSPARENT,CorpusCH1);}
void unloadApp(){
acedRegCmds->removeGroup(L"Group1");
AcRx::AppRetCode
acrxEntryPoint(AcRx::AppMsgCode msg, void* pkt){
switch (msg) {
case AcRx::kInitAppMsg:
acrxDynamicLinker->unlockApplication(pkt);
acrxDynamicLinker->registerAppMDIAware(pkt);
initApp();
break;
case AcRx::kUnloadAppMsg:
unloadApp();
return AcRx::kRetOK;}}}
при попытке кампиляции выдают ошибку
1>------ Build started: Project: kursovay, Configuration: Release Win32 ------
1>Compiling...
1>kursovay.cpp
1>.\kursovay.cpp(34) : error C2601: 'acrxEntryPoint' : local function definitions are illegal
1> .\kursovay.cpp(31): this line contains a '{' which has not yet been matched
1>Build log was saved at "file://c:\Documents and Settings\Администратор\Мои документы\Visual Studio 2008\Projects\kur\kur\Release\BuildLog.htm"
1>kursovay - 1 error(s), 0 warning(s)
========== Build: 0 succeeded, 1 failed, 0 up-to-date, 0 skipped ==========
версия ObjectARX 2007 и Visual Studio 2008, прога для AutoCAD 2007