Hi, On Wed, Jul 20, 2022 at 9:32 PM Greg Wooledge <g...@wooledge.org> wrote: > > 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.
Do you mean to say that the backticks are not supported on Debian? Or that there is no odbc_config installed when it should? > > 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) \ That's definitely ugly. > ... > > Or ask an ODBC developers' support channel how you're supposed to do it > on all the platforms you wish to support. The way to do it is by using odbc_config. I already asked and that's why I'm using it. > > > 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. You are presumably right. Trouble is - I'm doing it correctly and it's Debian who is at fault (see above).. Now, it is possible that odbc_config is just called pkg-config where available or vice versa. But the official way from upstream is to use odbc_config. Thank you. >