sql.h头文件丢失,虽然的unixODBC安装 [英] sql.h header file missing though unixODBC is installed

查看:612
本文介绍了sql.h头文件丢失,虽然的unixODBC安装的处理方法,对大家解决问题具有一定的参考价值,需要的朋友们下面随着小编来一起学习吧!

问题描述

我是一个高达最新的Ubuntu 12.04系统上。我有,MySQL和其相关的驱动程序安装了unixODBC(从Ubuntu回购v2.2.14)。还连接到一个有效的DSN。通过发出 ISQL数据库名的uname passwd文件验证。

I am on an up-to-date Ubuntu 12.04 system. I have unixodbc (v2.2.14 from ubuntu repos), MySQL and its relevant drivers installed. Also connected to a valid DSN. Verified by issuing isql DBName UName passwd.

我试图编译使用ODBC数据库交互的C应用程序。几乎无处不在我搜索似乎表明,我应该有sql.h的地方安装。 A 查找/ -iname sql.h -print 显示我没有它。

I am trying to compile a C application that interacts with the database using ODBC. Almost everywhere I searched seemed to indicate that I should have "sql.h" installed somewhere. A find / -iname sql.h -print showed I don't have it.

所以我的问题是:在哪里呢?做了出差错安装(没有错误的报道虽然)?而且你推荐什么步骤?重新安装?从源头code(最新版本?)?

So my question is: where is it? Did something go wrong with the install (no errors were reported though)? And what steps do you recommend? Reinstallation? Compilation from source code (the latest version?)?

推荐答案

您需要安装的unixODBC-dev的包来获得发展的头文件。

You need to install the unixodbc-dev package to get the development header files.

sudo apt-get install unixodbc-dev

-dev 包中包含需要编译和构建使用这些头,使该库的调用程序所需的头文件。该库文件本身会是你的情况经常包即的unixODBC 的一部分。

The -dev packages contain the require header files required to compile and build programs using these headers to make calls to the library. The library files themselves would be part of the regular package i.e. unixodbc in your case.

如果你想知道哪个包提供了某些文件,您可以使用的apt-文件

If you want to know which package provides a certain file, you could use apt-file:

sudo apt-file update
sudo apt-file find sql.h

这篇关于sql.h头文件丢失,虽然的unixODBC安装的文章就介绍到这了,希望我们推荐的答案对大家有所帮助,也希望大家多多支持IT屋!

查看全文
登录 关闭
扫码关注1秒登录
发送“验证码”获取 | 15天全站免登陆