[unixODBC-dev] Re: Symbol name collision between unixODBC and driver

Nick Gorham nick at lurcher.org
Wed Nov 2 18:10:49 GMT 2005


Marc Herbert wrote:

>Nick Gorham <nick at lurcher.org> writes:
>
>  
>
>>>Why do actually both unixODBC and MyODBC export the same function,
>>>when the latter should probably never get called?
>>>      
>>>
>>Because thats how ODBC works. the driver manager exports
>>SQL... functions that make up the ODBC API, and the driver does just
>>the same.
>>    
>>
>
>I am afraid this is an FAQ but... would you have a pointer giving more
>details about how this linking magic goes? I mean, how come the names
>do not clash?
>
>Thanks in advance!
>  
>
Basically becaus ethe driver manager is linked into the app, and at run 
time the drivers are linked in dynamically, and the addresses of the 
entry points are extracted. Have a look at dlopen and dlsys, and take a 
look at the DM code, its all in there.

Its the main point of ODBC, Your app is liniked against the driver 
manager, then at a later date the user can add additional drivers as 
required.

-- 
Nick



More information about the unixODBC-dev mailing list