On Wed, Jul 20, 2022 at 09:12:51PM -0500, Igor Korot wrote: > And those are what was made on Debian with the same Makefile.am:
OK! [...] > /bin/bash ../libtool --tag=CXX --mode=link g++ -I../../dbinterface > -DUNICODE -DUNIXODBC -I`odbc_config --cflags` -g -O0 -L../dbinterface > -ldbinterface `odbc_config --libs` -lodbcinst -o libodbc_lib.la > -rpath /usr/local/lib libodbc_lib_la-database_odbc.lo > /bin/bash: line 1: odbc_config: command not found > /bin/bash: line 1: odbc_config: command not found You're missing -lodbc here. Presumably that should have come from your backtick command, which obviously failed, because it's not the correct command substitution for this platform. You either need to find a command substitution that works on ALL of your platforms, or you need to put something in ./configure which tries all known commands and selects the one that appears to work, or else you need to just throw all the commands into one big ugly horrible linker invocation, something like: ../libtool --tag=CXX --mode=link g++ ... \ $(odbc_config --libs 2>/dev/null) \ $(pkg-config --libs whatever 2>/dev/null) \ ... Or ask an ODBC developers' support channel how you're supposed to do it on all the platforms you wish to support. > As you can see the build succeeded. > > But after running "make install" trying to load that library will fail > because the library > libodbc.so will not be found. I believe that's caused by the missing -lodbc linker argument. But please bear in mind that I haven't done serious C development work in many years, and I've never worked with ODBC in this way before.