[unixODBC-support] How to make unixODBC recognize my ODBC driver?

Nick Gorham nick at lurcher.org
Mon Jul 20 15:03:04 BST 2009


Villa Forlan wrote:
> Thank you for your answer, Nick!
>
> Well, it's true that I need to read much more to write shared 
> libraries. However, we all know that shared libraries in Linux do not 
> have to export functions like the ones in Windows do. Instead, all of 
> the functions inside a shared library in Linux can be called from the 
> outside world, without its writer having to do any extra work. Thus I 
> still don't get the point of 'export the ODBC functions' you said 
> above. Could you please help me to clarify this? Any of your answers 
> would be appreciated.
>
Thats fine, but more generally that linux, you can use a map file to 
instruct the linker what symbols to expose, on some platform it 
optional, on others its required to build a shared lib.
> Another thing I want to report to you is that, after adding the 
> function ODBCINSTGetProperties into my library's source code, I was 
> able to create and configure DSNs in ODBCConfig using my library. 
> However, I still could not connect to it via the isql command. It 
> stills threw me a 'Segmentation fault' error.
I said that exporting the properties would allow you to use ODBCConfig, 
I never said it would help with connecting via isql. To connect via isql 
it will need to be a ODBC driver exporting the API that isql and the 
driver manager needs. The simple way I find is to add all the entry 
points to the driver, just as stubs. Make each stub print the name of 
the API called, build the lib, and try and connect. See what API calls a 
made, then complete the ones that are needed.

-- 
Nick


More information about the unixODBC-support mailing list