在centos7上安装erlang20时,当make的时候出现一下错误:
篇幅有点长,我就截取第一个报错
SQL_C_WCHAR’ undeclared (first use in this function)
一般遇到这种错误是因为头文件里面没有定义,我进入头文件odbcserver.h中的确没有SQL_C_WCHAR的宏定义,但是要添加SQL_C_WCHAR宏定义,我要定义成什么?
网上几乎没有相关资料案例,请问有大神有头绪吗?
odbcserver.c: In function ‘encode_out_params’:
odbcserver.c:1223:22: error: ‘SQL_C_WCHAR’ undeclared (first use in this function); did you mean ‘SQL_C_CHAR’?
case SQL_C_WCHAR:
^~~~~~~~~~~
SQL_C_CHAR
odbcserver.c:1223:22: note: each undeclared identifier is reported only once for each function it appears in
odbcserver.c: In function ‘encode_column_name_list’:
odbcserver.c:1308:81: error: ‘SQL_WLONGVARCHAR’ undeclared (first use in this function); did you mean ‘SQL_LONGVARCHAR’?
if(sql_type == SQL_LONGVARCHAR || sql_type == SQL_LONGVARBINARY || sql_type == SQL_WLONGVARCHAR)
^~~~~~~~~~~~~~~~
SQL_LONGVARCHAR
odbcserver.c: In function ‘encode_column_dyn’:
odbcserver.c:1506:7: error: ‘SQL_C_WCHAR’ undeclared (first use in this function); did you mean ‘SQL_C_CHAR’?
case SQL_C_WCHAR:
^~~~~~~~~~~
SQL_C_CHAR
odbcserver.c: In function ‘encode_data_type’:
odbcserver.c:1552:10: error: ‘SQL_WCHAR’ undeclared (first use in this function); did you mean ‘SQLWCHAR’?
case SQL_WCHAR:
^~~~~~~~~
SQLWCHAR
odbcserver.c:1557:10: error: ‘SQL_WVARCHAR’ undeclared (first use in this function); did you mean ‘SQL_VARCHAR’?
case SQL_WVARCHAR:
^~~~~~~~~~~~
SQL_VARCHAR
odbcserver.c:1615:10: error: ‘SQL_WLONGVARCHAR’ undeclared (first use in this function); did you mean ‘SQL_LONGVARCHAR’?
case SQL_WLONGVARCHAR:
^~~~~~~~~~~~~~~~
SQL_LONGVARCHAR
odbcserver.c: In function ‘decode_params’:
odbcserver.c:1695:10: error: ‘SQL_C_WCHAR’ undeclared (first use in this function); did you mean ‘SQL_C_CHAR’?
case SQL_C_WCHAR:
^~~~~~~~~~~
SQL_C_CHAR
odbcserver.c: In function ‘init_param_column’:
odbcserver.c:2285:22: error: ‘SQL_WCHAR’ undeclared (first use in this function); did you mean ‘SQLWCHAR’?
params->type.sql = SQL_WCHAR; break;
^~~~~~~~~
SQLWCHAR
odbcserver.c:2287:22: error: ‘SQL_WVARCHAR’ undeclared (first use in this function); did you mean ‘SQL_VARCHAR’?
params->type.sql = SQL_WVARCHAR; break;
^~~~~~~~~~~~
SQL_VARCHAR
odbcserver.c:2289:22: error: ‘SQL_WLONGVARCHAR’ undeclared (first use in this function); did you mean ‘SQL_LONGVARCHAR’?
params->type.sql = SQL_WLONGVARCHAR; break;
^~~~~~~~~~~~~~~~
SQL_LONGVARCHAR
odbcserver.c:2294:26: error: ‘SQL_C_WCHAR’ undeclared (first use in this function); did you mean ‘SQL_C_CHAR’?
params->type.c = SQL_C_WCHAR;
^~~~~~~~~~~
SQL_C_CHAR
odbcserver.c: In function ‘map_sql_2_c_column’:
odbcserver.c:2453:10: error: ‘SQL_WCHAR’ undeclared (first use in this function); did you mean ‘SQLWCHAR’?
case SQL_WCHAR:
^~~~~~~~~
SQLWCHAR
odbcserver.c:2454:10: error: ‘SQL_WVARCHAR’ undeclared (first use in this function); did you mean ‘SQL_VARCHAR’?
case SQL_WVARCHAR:
^~~~~~~~~~~~
SQL_VARCHAR
odbcserver.c:2455:10: error: ‘SQL_WLONGVARCHAR’ undeclared (first use in this function); did you mean ‘SQL_LONGVARCHAR’?
case SQL_WLONGVARCHAR:
^~~~~~~~~~~~~~~~
SQL_LONGVARCHAR
odbcserver.c:2457:28: error: ‘SQL_C_WCHAR’ undeclared (first use in this function); did you mean ‘SQL_C_CHAR’?
column -> type.c = SQL_C_WCHAR;
^~~~~~~~~~~
SQL_C_CHAR
odbcserver.c: In function ‘retrive_param_values’:
odbcserver.c:2576:10: error: ‘SQL_C_WCHAR’ undeclared (first use in this function); did you mean ‘SQL_C_CHAR’?
case SQL_C_WCHAR:
^~~~~~~~~~~
SQL_C_CHAR
x86_64-unknown-linux-gnu/Makefile:122: recipe for target '../priv/obj/x86_64-unknown-linux-gnu/odbcserver.o' failed
make[4]: *** [../priv/obj/x86_64-unknown-linux-gnu/odbcserver.o] Error 1
make[4]: Leaving directory '/home/kuangweijian/workspace/otp_src_21.1/lib/odbc/c_src'
/home/kuangweijian/workspace/otp_src_21.1/make/run_make.mk:35: recipe for target 'opt' failed
make[3]: *** [opt] Error 2
make[3]: Leaving directory '/home/kuangweijian/workspace/otp_src_21.1/lib/odbc/c_src'
/home/kuangweijian/workspace/otp_src_21.1/make/otp_subdir.mk:29: recipe for target 'opt' failed
make[2]: *** [opt] Error 2
make[2]: Leaving directory '/home/kuangweijian/workspace/otp_src_21.1/lib/odbc'
/home/kuangweijian/workspace/otp_src_21.1/make/otp_subdir.mk:29: recipe for target 'opt' failed
make[1]: *** [opt] Error 2
make[1]: Leaving directory '/home/kuangweijian/workspace/otp_src_21.1/lib'
Makefile:482: recipe for target 'libs' failed
make: *** [libs] Error 2