几何尺寸与公差论坛------致力于产品几何量公差标准GD&T (GDT:ASME)|New GPS(ISO)研究/CAD设计/CAM加工/CMM测量

几何尺寸与公差论坛------致力于产品几何量公差标准GD&T (GDT:ASME)|New GPS(ISO)研究/CAD设计/CAM加工/CMM测量 (http://www.dimcax.com/hust/index.php)
-   DirectDWG (http://www.dimcax.com/hust/forumdisplay.php?f=89)
-   -   【转帖】odsetlocale (http://www.dimcax.com/hust/showthread.php?t=17760)

yang686526 2009-05-06 09:08 PM

【转帖】odsetlocale
 
odsetlocale
odsetlocale
error c2664: '_wsetlocale' : cannot convert parameter 2 from 'const odchar *' to 'const wchar_t *'
i just added the 2.4.1 liraries/headers to my existing project, and i am getting spammed with compiler errors like the ones above. i know there has got to be a compiler option i am missing, but i must admit i hacked your headers for 2.3.0 to use:
code:
_wsetlocale(_category, _origlocale);
instead of
code:
_wsetlocale(_category, _origlocale.c_str());
any quick suggestions on where to start?
tracked it down to wchar_t as a built in type. if i set this to false, all is well.
this is a dd error in odsetlocale.h, and your correction is right. (we'll include that fix in the next update).
was that fix not sufficient, to compile with /zc:wchar_t+ ?
vladimir

my "fix" on your headers does work, as does leaving your headers be and not using wchat_t as built in.
i prefer not modifying any headers other than my own, as it prevents this kind of thing in the future (where i forget it and it becomes an issue when 2.5.1 comes out).


所有的时间均为北京时间。 现在的时间是 04:59 PM.