Menu

Linux Oracle ODBC problem. Undefined reference to SQLConnect.

OTL
2019-07-08
2019-07-08
  • Joshua Nocturne

    Joshua Nocturne - 2019-07-08

    For some reasons i need to use odbc to connect oracle on linux. So i got oracle-odbc driver from oracle official website. Then i compile my otl test code and then i got link error like this:
    undefined reference to SQLSetConnectAttr
    undefined reference to SQLConnect
    ...
    I use nm to check the driver lib symbols then i find there is only unicode api like 'SQLConnectW' in lib file. So how can i fix this problem cause i couldn't find any odbc lib file that contain odbc api like 'SQLConnect' on oracle official website.
    best regards.

     
  • Joshua Nocturne

    Joshua Nocturne - 2019-07-08

    I just realized that I should link unix-odbc library instead of oracle-odbc driver library. The problem has been solved.

     

Log in to post a comment.