[ARX]求教!
<P>请教各位大虾:调试时出现下面的是什么问题?就算我仅仅写一句:acedAlert("ppp")也出现如下类似的问题?不知是不是我设置的有问题?我用的是VC2005+objectARX2007.</P><P>.\HelloWorld.cpp(14) : error C2664: 'AcEdCommandStack::addCommand' : cannot convert parameter 1 from 'const char ' to 'const ACHAR *'<BR> Types pointed to are unrelated; conversion requires reinterpret_cast, C-style cast or function-style cast<BR>.\HelloWorld.cpp(18) : error C2664: 'AcEdCommandStack::removeGroup' : cannot convert parameter 1 from 'const char ' to 'const ACHAR *'<BR> Types pointed to are unrelated; conversion requires reinterpret_cast, C-style cast or function-style cast<BR>.\HelloWorld.cpp(22) : error C2664: 'acutPrintf' : cannot convert parameter 1 from 'const char ' to 'const ACHAR *'<BR> Types pointed to are unrelated; conversion requires reinterpret_cast, C-style cast or function-style cast<BR>Generating Code...<BR>Build log was saved at "<A href="file:///f:/vc2005/" target="_blank" >file://f:\vc2005\</A>新建文件夹\Step01\Release\BuildLog.htm"<BR>Step01 - 3 error(s), 0 warning(s)<BR><BR></P> <P>把你的程序贴一下,大家一起看看啊,</P>
<P>'AcEdCommandStack::addCommand' : cannot convert parameter 1 from 'const char ' to 'const ACHAR *'<BR></P> <P>我在VC里新建了一个objectAR文件,只在入口函数添加了一句话:acedAlert("My Sample");不知道加的位置对不对。</P>
<P>class CfirstWizardApp : public AcRxArxApp {</P>
<P>public:<BR> CfirstWizardApp () : AcRxArxApp () {}</P>
<P> virtual AcRx::AppRetCode On_kInitAppMsg (void *pkt) {<BR> // TODO: Load dependencies here</P>
<P> // You *must* call On_kInitAppMsg here<BR> AcRx::AppRetCode retCode =AcRxArxApp::On_kInitAppMsg (pkt) ;<BR> <BR> // TODO: Add your initialization code here<BR> acedAlert("My Sample");<BR> return (retCode) ;<BR> }</P>
<P> virtual AcRx::AppRetCode On_kUnloadAppMsg (void *pkt) {<BR> // TODO: Add your code here</P>
<P> // You *must* call On_kUnloadAppMsg here<BR> AcRx::AppRetCode retCode =AcRxArxApp::On_kUnloadAppMsg (pkt) ;</P>
<P> // TODO: Unload dependencies here</P>
<P> return (retCode) ;<BR> }</P>
<P> virtual void RegisterServerComponents () {<BR> }</P>
<P>} ;</P>
<P>//-----------------------------------------------------------------------------<BR>IMPLEMENT_ARX_ENTRYPOINT(CfirstWizardApp)</P>
<P>调试的结果:acrxEntryPoint.cpp<BR>f:\vc2005\firstwizard\acrxentrypoint.cpp(46) : error C2664: 'acedAlert' : cannot convert parameter 1 from 'const char ' to 'const ACHAR *'<BR> Types pointed to are unrelated; conversion requires reinterpret_cast, C-style cast or function-style cast<BR>Build log was saved at "<A href="file:///f:/vc2005/firstWizard/Debug/BuildLog.htm" target="_blank" >file://f:\vc2005\firstWizard\Debug\BuildLog.htm</A>"<BR>firstWizard - 1 error(s), 0 warning(s)</P> <P>请问使用objectARX2007的大虾们,我是新手,我都不知道怎么用。</P>
<P>(1)是否需要在VC里设置些东西?我设置了一些,但是按照2004的做的</P>
<P>(2)怎样使用?怎样在VC里编成?是不是可以新建DLL文件或者ARX文件?然后呢? </P>
<P>(3)有没有相关的书籍,我能借到的书都是关于ARX2000的?能否提供。NET最好是2007的相关学习资料?</P> acedAlert(L"My Sample"); <p>autodesk有书籍,25美元,加运费75美元</p> function XML() {
} <p>CAD2007要求Unicode,要添加TChar.h,然后把char替换成TCHAR</p> char ACHAR TCHAR
都被弄糊涂了,现在学习ObjectArx,C2664 的错误老出现,
不是这里就是那里
Autodesk 究竟是怎么搞的
快崩溃了 忽悠悠 发表于 2009-9-8 11:40 static/image/common/back.gif
CAD2007要求Unicode,要添加TChar.h,然后把char替换成TCHAR
哪里有资料可以看看呀
页:
[1]
2