[unixODBC-support] strange behaviour in wxWidgets, how to debug?

Nick Gorham nick.gorham at easysoft.com
Fri Nov 19 10:01:00 GMT 2004

Ron Arts wrote:

> Hi,
> linux/ppc, yellowdoglinux (= redhat 9), unixODBC version 2.2.9/
> 2.2.3, wxWidgets 2.4.2, 2.5.3
> I'm posting here because I want to debug, and don't know how.
> All unixODBC programs are working correctly on my machine,
> and I can do queries on the (PostgreSQL) database using
> isql without any problems. It does not work at all from my
> wxidgets program though.
> First my problems:
> - for some reason my program does not even TRY to read /etc/odbc.ini,
>   but ONLY reads ~/.odbc.ini.
> - SQLConnect return -1

I would check to see if any environment variables are being set.

> So now I have the following questions:
> - are there any circumstances thinkable which make libodbc
>   stop opening /etc/odbc.ini, and only look for ~/.odbc.ini?
>   (I use the SQLDataSources enumeration function, with the
>    SQL_FETCH_FIRST/NEXT constants)

Can you send a ODBC trace of the app and I will see if it shows anything.

> - How do I compile the odbc package so I can use gdb to step
>   through the library. My fc2 specfile uses:
>   ./configure --with-gnu-ld=yes --enable-threads=yes --enable-gui=yes
>      --enable-static=yes --enable-drivers
>   configure does not seem to support --enable-debug or something.
>   should something like prefixing configure with CFLAGS="-g" work?
Yes that should work, however GDB sometimes has a problem stepping into 
dlopened libs.


More information about the unixODBC-support mailing list