[m-users.] ODBC library

Julien Fischer jfischer at opturion.com
Mon Jan 17 03:21:09 AEDT 2022


Hi Volker,

On Sun, 16 Jan 2022, Volker Wysk wrote:

> Am Sonntag, dem 16.01.2022 um 16:35 +1100 schrieb Julien Fischer:

>> I will rename the Mercury library to libmercury_odbc, which should
>> avoid that problem (and will hopefully assist in reducing confusion).
>
> You haven't done that yet,

No, I was trying (and failing) to get unixODBC to talk to the
DB installed on my desktop instead :-(

> right now, in Git. I'd like to volunteer to do
> this. All the prefixes "odbc." need to be changed to "mercury_odbc.". Okay?

The odbc module doesn't need to be changed at all; none of the symbol
names it exports should overlap with those in unixODBC.  (The mercury
symbols will all be prefix with 'mercury__' and those defined in
foreign_code pragmas should be be prefixed with 'MODBC_'.)

To rename the library, all you need to do is add a dummy module named
mercury_odbc that imports the odbc module and adjust the Mmakefile etc
to build mercury_odbc instead.  The contents of mercury_odbc, just 
need to be

     :- module mercury_odbc.
     :- interface
     :- import odbc.

This is the approach that is used in many of the other extras
(e.g. extras/cgi or extras/graphics/mercury_opengl).

Julien.


More information about the users mailing list