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

Villa Forlan villaforlan at yahoo.com
Mon Jul 20 16:44:29 BST 2009


Thank you so much for your fast and useful answer, Nick! 

Using your excellent method I managed to hunt down the hidden error and solve it. Now I can connect sucessfully to a database file via the command isql (using my driver).

Best regards,

Itachi.




________________________________
From: Nick Gorham <nick at lurcher.org>
To: Support for the unixODBC project <unixodbc-support at mailman.unixodbc.org>
Sent: Monday, July 20, 2009 9:03:04 PM
Subject: Re: [unixODBC-support] How to make unixODBC recognize my ODBC driver?

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
_______________________________________________
unixODBC-support mailing list
unixODBC-support at mailman.unixodbc.org
http://mailman.unixodbc.org/mailman/listinfo/unixodbc-support



      
-------------- next part --------------
An HTML attachment was scrubbed...
URL: <http://mailman.unixodbc.org/pipermail/unixodbc-support/attachments/20090720/0cad0372/attachment.html>


More information about the unixODBC-support mailing list