This question already has an answer here:
这个问题已经有了答案:
- sql.h header file missing though unixODBC is installed 1 answer
- sql。h头文件丢失,但unixODBC安装了1个答案。
I am trying to compile a simple C program on an UNIX machine which just has sql.h header statement to make sure that odbc headers are working.
我正在尝试编译一个UNIX机器上的一个简单的C程序,它有sql。h头语句,以确保odbc头正在工作。
But Im keep on getting this error.
但是我一直在犯这个错误。
error: sql.h: A file or directory in the path name does not exist
错误:sql。h:路径名中的文件或目录不存在。
#include<stdio.h>
#include<sql.h>
main(){
}
I used this code because no matter what I put inside the Main fuction, the header itself fails.
我使用了这个代码,因为无论我在主函数中放入什么,header本身都失败了。
But I have installed ODBCUnix . Here are the commands which shows ODBC status.
但是我已经安装了ODBCUnix。下面是显示ODBC状态的命令。
/apps/rmb/scripts$odbcinst --version unixODBC 2.3.0
脚本/程序/人民币/美元odbcinst unixODBC tripwire——版本
odbcinst -j unixODBC 2.3.0 DRIVERS............: /etc/odbcinst.ini SYSTEM DATA SOURCES: /etc/odbc.ini FILE DATA SOURCES..: /etc/ODBCDataSources USER DATA SOURCES..: /etc/odbc.ini SQLULEN Size.......: 8 SQLLEN Size........: 8 SQLSETPOSIROW Size.: 8
odbcinst -j unixODBC 2.3.0驱动程序:/etc/odbcinst.系统数据源:/etc/odbc。ini文件数据源。:/etc/ODBCDataSources用户数据源..:/etc/odbc.ini SQLULEN .......大小:8 SQLLEN ........大小:8 SQLSETPOSIROW大小。:8
Please advise how to compile this simple program .
请告知如何编译这个简单的程序。
1 个解决方案
#1
0
The code seems to be not formatted properly. I tried to do it again and again but it still shows the same thing.
代码似乎没有正确格式化。我试着一遍又一遍的做,但还是一样。
Actually the headers were sql.h and stdio.h and a empty main program.
实际上,header是sql。h和它的。一个空的主程序。
Please don't think like the program has typo errors. It is not formatted properly.
请不要认为程序有输入错误。它没有正确格式化。
#1
0
The code seems to be not formatted properly. I tried to do it again and again but it still shows the same thing.
代码似乎没有正确格式化。我试着一遍又一遍的做,但还是一样。
Actually the headers were sql.h and stdio.h and a empty main program.
实际上,header是sql。h和它的。一个空的主程序。
Please don't think like the program has typo errors. It is not formatted properly.
请不要认为程序有输入错误。它没有正确格式化。