If the undefined symbols are all of the form SQLxxx, try adding -lodbc to the link line. This tells the linker to use libodbc.ext.
SQLxxx
-lodbc
libodbc.ext