undeclared identifier error when using ACRX_T

undeclared identifier error when using ACRX_T

Anonymous
Not applicable
686 Views
3 Replies
Message 1 of 4

undeclared identifier error when using ACRX_T

Anonymous
Not applicable
I'm converting an application (created with VS2002) that works with AutoCAD 2006 to work with AutoCAD 2007 and I also switched to VS2005.
I got error C2664: 'AcDbPlotSettings::getPlotCfgName' : cannot convert parameter 1 from 'const char *' to 'const ACHAR *&'

So I added ACRX_T like so:
const char* plotCfgchar;
pPlotSettings->getPlotCfgName( ACRX_T(plotCfgchar) );
But now I get a different error:
error C2065: 'LplotCfgchar' : undeclared identifier

Any idea what the solution is?
Thanks
0 Likes
687 Views
3 Replies
Replies (3)
Message 2 of 4

Anonymous
Not applicable
ACRX_T is for literal strings. Change the type of plotCfgchar to const
ACHAR* instead. 🙂
--
Owen Wengerd
President, ManuSoft ==> http://www.manusoft.com
VP Americas, CADLock, Inc. ==> http://www.cadlock.com


wrote in message news:5740968@discussion.autodesk.com...
I'm converting an application (created with VS2002) that works with AutoCAD
2006 to work with AutoCAD 2007 and I also switched to VS2005.
I got error C2664: 'AcDbPlotSettings::getPlotCfgName' : cannot convert
parameter 1 from 'const char *' to 'const ACHAR *&'

So I added ACRX_T like so:
const char* plotCfgchar;
pPlotSettings->getPlotCfgName( ACRX_T(plotCfgchar) );
But now I get a different error:
error C2065: 'LplotCfgchar' : undeclared identifier

Any idea what the solution is?
Thanks
0 Likes
Message 3 of 4

Anonymous
Not applicable
Owen, thanks a lot, this cut my errors in half.
It’s just that in some cases it created a chain reaction. For example:
I changed
Cstring choixFich; to ACHAR choixFich;
And now I get error C2440: '=' : cannot convert from 'CString' to 'ACHAR'
On this line:
choixFich = fDlg.GetPathName();

GetPathName is defined in:
c:\program files\microsoft visual studio 8\vc\atlmfc\include\afxdlgs.h
CString GetPathName() const; // return full path and filename
I imagine I should not change the definition in afxdlgs.h

Should the Cstring be treated differently?
Thanks Message was edited by: Barts007
0 Likes
Message 4 of 4

Anonymous
Not applicable
It sounds to me like you are creating serious problems for yourself. I
recommend that you find an experienced C++ programmer to help you with this
project. 🙂
--
Owen Wengerd
President, ManuSoft ==> http://www.manusoft.com
VP Americas, CADLock, Inc. ==> http://www.cadlock.com


wrote in message news:5741475@discussion.autodesk.com...
Owen, thanks a lot, this cut my errors in half.
It's just that in some cases it created a chain reaction. For example:
I changed
Cstring choixFich; to ACHAR choixFich;
And now I get error C2440: '=' : cannot convert from 'CString' to 'ACHAR'
On this line:
choixFich = fDlg.GetPathName();

GetPathName is defined in:
c:\program files\microsoft visual studio 8\vc\atlmfc\include\afxdlgs.h
CString GetPathName() const; // return full path and filename
I imagine I should not change the definition in afxdlgs.h

Should the Cstring be treated differently?
Thanks

Message was edited by: Barts007
0 Likes