Sample Header Ad - 728x90

/etc/odbcinst.ini used by 64 and 32 bits applications

0 votes
1 answer
935 views
I have the following /etc/odbcinst.ini file [root@]# cat /etc/odbcinst.ini [FreeTDS] Description=FreeTDS odbc driver #Driver=/usr/lib/libtdsodbc.so.0 Driver=/usr/lib64/libtdsodbc.so.0 UsageCount=1 I have applications compiled for 64 and 32 bits. [root@]# ldd prog_32 | grep odbc libodbc.so.2 => /lib/libodbc.so.2 (0xf7563000) [root@]# ldd prog_64 | grep odbc libodbc.so.2 => /lib64/libodbc.so.2 (0x00007f6087202000) As you probably noticed I have 2 entries in odbcinst.ini file for Driver, one for 32 bits and the other for 64. The problem is that if I run program compiled for 64 bits while the Driver is 32 bits or the other way around my program fails at run time with the error OTL error message = [unixODBC][Driver Manager]Can't open lib '/usr/lib/libtdsodbc.so.0' : file not found So I go and replace the Driver entry in the odbcinst.ini until next time it will happen to me which is quite frequent. Is there a way to use 64 bit drive for 64 bits applications and 32 bits driver for 32 bits application without needing to comment out the entry in the configuration file?
Asked by e271p314 (359 rep)
Feb 15, 2018, 09:13 AM
Last activity: Apr 16, 2019, 01:40 PM