+ -
当前位置:首页 → 问答吧 → Ubuntu Linux:MySQL安装指南(转贴)

Ubuntu Linux:MySQL安装指南(转贴)

时间:2010-10-08

来源:互联网

小弟我在ubuntu上安装了db29.7的server企业版,选择典型安装。实例创建等都没有问题,服务器启动正常。

之后我写了一个hello.sqc程序,启动服务器连接数据库后,执行db2 prep hello.sqc bindfile提示0错误0警告,
生成hello.c和hello.bnd文件,db2 bind hello.bnd成功,

之后我gcc hello.c程序,报错如下
"hello.c", line 14.10: 1506-296 (S) #include file "sqladef.h" not found.
"hello.c", line 16.15: 1506-007 (S) "struct sqla_runtime_info" is undefined.
"hello.c", line 17.43: 1506-045 (S) Undeclared identifier wchar_t.
"hello.c", line 20.37: 1506-221 (S) Initializer must be a valid constant expression.
"hello.c", line 21.37: 1506-221 (S) Initializer must be a valid constant expression.
"/usr/include/sys/inttypes.h", line 98.25: 1506-865 (E) The typedef definition of wchar_t is incompatible with the option wchar_t_size
"/usr/include/sys/inttypes.h", line 101.41: 1506-275 (S) Unexpected text '*' encountered.
"/usr/include/sys/inttypes.h", line 101.57: 1506-046 (S) Syntax error.
"/usr/include/sys/inttypes.h", line 102.42: 1506-275 (S) Unexpected text '*' encountered.
"/usr/include/sys/inttypes.h", line 102.58: 1506-046 (S) Syntax error.
"hello.sqc", line 9.10: 1506-296 (S) #include file "sqlca.h" not found.
"hello.sqc", line 10.10: 1506-296 (S) #include file "sqlda.h" not found.
"hello.sqc", line 10.32: 1506-194 (S) Incomplete type is not allowed.
"hello.sqc", line 10.1: 1506-505 (S) Type "struct sqlca" of identifier "sqlca" was incomplete at the end of its scope.

请问各位大侠,我的操作以及安装哪里存在问题呢,是gcc编译器哪里少装了东西,还是数据库少装了东西?
需要怎么解决呢?


在线等!谢谢!

作者: changlianggao   发布时间: 2010-10-08

大家给点意见啊!!!

作者: changlianggao   发布时间: 2010-10-08

小弟我在ubuntu上安装了db29.7的server企业版,选择典型安装。实例创建等都没有问题,服务器启动正常。

之后我写了一个hello.sqc程序,启动服务器连接数据库后,执行db2 prep hello.sqc bindfile提示0错误0警告,
生成hello.c和hello.bnd文件,db2 bind hello.bnd成功,

之后我gcc hello.c程序,报错如下
"hello.c", line 14.10: 1506-296 (S) #include file "sqladef.h" not found.
"hello.c", line 16.15: 1506-007 (S) "struct sqla_runtime_info" is undefined.
"hello.c", line 17.43: 1506-045 (S) Undeclared identifier wchar_t.
"hello.c", line 20.37: 1506-221 (S) Initializer must be a valid constant expression.
"hello.c", line 21.37: 1506-221 (S) Initializer must be a valid constant expression.
"/usr/include/sys/inttypes.h", line 98.25: 1506-865 (E) The typedef definition of wchar_t is incompatible with the option wchar_t_size
"/usr/include/sys/inttypes.h", line 101.41: 1506-275 (S) Unexpected text '*' encountered.
"/usr/include/sys/inttypes.h", line 101.57: 1506-046 (S) Syntax error.
"/usr/include/sys/inttypes.h", line 102.42: 1506-275 (S) Unexpected text '*' encountered.
"/usr/include/sys/inttypes.h", line 102.58: 1506-046 (S) Syntax error.
"hello.sqc", line 9.10: 1506-296 (S) #include file "sqlca.h" not found.
"hello.sqc", line 10.10: 1506-296 (S) #include file "sqlda.h" not found.
"hello.sqc", line 10.32: 1506-194 (S) Incomplete type is not allowed.
"hello.sqc", line 10.1: 1506-505 (S) Type "struct sqlca" of identifier "sqlca" was incomplete at the end of its scope.

请问各位大侠,我的操作以及安装哪里存在问题呢,是gcc编译器哪里少装了东西,还是数据库少装了东西?
需要怎么解决呢?


在线等!谢谢!

作者: changlianggao   发布时间: 2010-10-08

大家给点意见啊!!!

作者: changlianggao   发布时间: 2010-10-08