我想为Mac OSX Mountain Lion设置unixODBC,以便我可以使用RODBC访问Excel电子表格。unixODBC-qui-qt安装 - 无法编译Qt程序
我做了很多的研究在各种文档和网站,并了解以下步骤:
- 安装了unixODBC 2.3.1
- 安装freetds的0.91(只想要一个自由的ODBC驱动程序来测试)
指定要使用的ODBC驱动程序。我创建了一个tds.driver.template,并成功安装在unixODBC中。见下文:
[freetds的] 描述= v0.63与协议V8.0 驱动= /usr/local/freetds/lib/libtdsodbc.so
$须藤ODBCINST -i -d -f TDS .driver.template
$ ODBCINST -q -d [freetds的]
最后做出具体的DSN的连接。但是,当我尝试配置了unixODBC贵-QT如下:
./configure --with-qt-dir-include=/usr/include --with-qt-dir-lib=/usr/lib --with-qt-dir-bin=/usr/bin
它提供了以下错误:
configure: checking for Qt
yes (/usr/include)
yes (/usr/lib)
yes (/usr/bin)
checking for /usr/include/QtGui/QWizard... no
checking for /usr/include/QtGui/QMdiArea... no
configure: qt_dir_lib=/usr/lib
configure: LDFLAGS=
configure: X_LIBS= -L/usr/X11/lib -R/usr/X11/lib
checking whether a simple Qt program compiles... no
configure: error: cannot compile a Qt program!
安装上面,我已经安装了之前的autoconf,automake的,libtool的和Qt用于Mac OSX的库4.8.4。
第一个问题:我是否错过任何一步或在某些点错误配置?
我现在在学习R,但花了两天在Mac上配置ODBC我有点出乎我的意料。我只想使用unixODBC提供的所有工具,包括其驱动程序管理器和GUI工具来指定DSN。我应该用emacs来编辑odbc.ini吗?
第二个问题:在我指定DSN之后,是否可以使用RODBC访问Excel电子表格?现在,它有以下错误。而且我不确定是否需要采取任何措施将RODBC配置为使用unixODBC而不是iODBC。
> library(RODBC)
> conn.xls = odbcConnect ("~/Documents/R/R軟體應用統計方法/my notes/babies.xls")
> warnings()
Warning messages:
1: In odbcDriverConnect("DSN=~/Documents/R/R軟體應用統計方法/my notes/babies.xls") :
[RODBC] ERROR: state IM002, code -83788248, message [iODBC][Driver Manager]Data source name not found and no default driver specified. Driver could not be loaded
非常感谢您的协助。