我用oracle预编译pc源程序后,总会得到,便会得到如下一大堆的错误:
1
PCC-S-02201, 出现符号 "wchar_t"在需要下列之一时:
; , = ( [
符号 ";" 被替换为 "wchar_t" 后继续。语法错误出现在540行,1列, 文件C:\Program Files\Microsoft Visual Studio 9.0\VC\inc
lude\stdio.h:
错误发生在行540, 列1, 文件C:\Program Files\Microsoft Visual Studio 9.0\VC\includ
e\stdio.h
__DEFINE_CPP_OVERLOAD_STANDARD_FUNC_0_2_ARGLIST_EX(int, __RETURN_POLICY_SAME, _SWPRINTFS_DEPRECATED _CRTIMP, __swprintf_l, __vswprintf_l, _vswprintf_s_l, _Pre_notnull_ _Post_z_ wchar_t, , wchar_t, _Dest, _In_z_ _Printf_format_string_ constwchar_t *, _Format, _locale_t, _Plocinfo)
1
PCC-S-02201, 出现符号 "_Plocinfo"在需要下列之一时:
; , = ( [
…… …… …… …… …… ……… ……… …… ……
发现原来是stdio.h文件中的问题,当我注释掉头文件stdio.h中的下面两句后,便可正常编译通过:__DEFINE_CPP_OVERLOAD_STANDARD_FUNC_0_1_ARGLIST_EX(int, __RETURN_POLICY_SAME, _SWPRINTFS_DEPRECATED _CRTIMP, _swprintf, _swprintf_s, _vswprintf, vswprintf_s, _Pre_notnull_ _Post_z_, wchar_t, _Dest, _In_z_ _Printf_format_string_ const wchar_t *, _Format)
__DEFINE_CPP_OVERLOAD_STANDARD_FUNC_0_2_ARGLIST_EX(int, __RETURN_POLICY_SAME, _SWPRINTFS_DEPRECATED _CRTIMP, __swprintf_l, __vswprintf_l, _vswprintf_s_l, _Pre_notnull_ _Post_z_ wchar_t, , wchar_t, _Dest, _In_z_ _Printf_format_string_ const wchar_t *, _Format, _locale_t, _Plocinfo)不知道这是什么原因,是否是VC版本太高?请教大牛解释。我用的IDE是VS2008,系统是XP sp3,数据库为oracle 10g.
1
PCC-S-02201, 出现符号 "wchar_t"在需要下列之一时:
; , = ( [
符号 ";" 被替换为 "wchar_t" 后继续。语法错误出现在540行,1列, 文件C:\Program Files\Microsoft Visual Studio 9.0\VC\inc
lude\stdio.h:
错误发生在行540, 列1, 文件C:\Program Files\Microsoft Visual Studio 9.0\VC\includ
e\stdio.h
__DEFINE_CPP_OVERLOAD_STANDARD_FUNC_0_2_ARGLIST_EX(int, __RETURN_POLICY_SAME, _SWPRINTFS_DEPRECATED _CRTIMP, __swprintf_l, __vswprintf_l, _vswprintf_s_l, _Pre_notnull_ _Post_z_ wchar_t, , wchar_t, _Dest, _In_z_ _Printf_format_string_ constwchar_t *, _Format, _locale_t, _Plocinfo)
1
PCC-S-02201, 出现符号 "_Plocinfo"在需要下列之一时:
; , = ( [
…… …… …… …… …… ……… ……… …… ……
发现原来是stdio.h文件中的问题,当我注释掉头文件stdio.h中的下面两句后,便可正常编译通过:__DEFINE_CPP_OVERLOAD_STANDARD_FUNC_0_1_ARGLIST_EX(int, __RETURN_POLICY_SAME, _SWPRINTFS_DEPRECATED _CRTIMP, _swprintf, _swprintf_s, _vswprintf, vswprintf_s, _Pre_notnull_ _Post_z_, wchar_t, _Dest, _In_z_ _Printf_format_string_ const wchar_t *, _Format)
__DEFINE_CPP_OVERLOAD_STANDARD_FUNC_0_2_ARGLIST_EX(int, __RETURN_POLICY_SAME, _SWPRINTFS_DEPRECATED _CRTIMP, __swprintf_l, __vswprintf_l, _vswprintf_s_l, _Pre_notnull_ _Post_z_ wchar_t, , wchar_t, _Dest, _In_z_ _Printf_format_string_ const wchar_t *, _Format, _locale_t, _Plocinfo)不知道这是什么原因,是否是VC版本太高?请教大牛解释。我用的IDE是VS2008,系统是XP sp3,数据库为oracle 10g.
1.删掉#include <stdio.h>语句,proc编译.PC文件以后再在生成的.C文件中把#include <stdio.h>加上
2.把2008的include文件夹里的stdio.h文件替换成VC6.0的stdio.h文件,就能编译通过了,只是估计这么做有潜在危险