I'm trying to use unixodbc in my C program, and I've included the sql.h
header file that's needed to use the odbc functions. For some reason, though, when trying to compile a simple example file I get the following output:
➜ practica2 gcc sale.c
Undefined symbols for architecture x86_64:
"_SQLAllocHandle", referenced from:
_main in sale-179b46.o
"_SQLDescribeCol", referenced from:
_main in sale-179b46.o
"_SQLExecDirect", referenced from:
_main in sale-179b46.o
"_SQLFetch", referenced from:
_main in sale-179b46.o
"_SQLGetData", referenced from:
_main in sale-179b46.o
"_SQLNumResultCols", referenced from:
_main in sale-179b46.o
"_odbc_connect", referenced from:
_main in sale-179b46.o
"_odbc_disconnect", referenced from:
_main in sale-179b46.o
ld: symbol(s) not found for architecture x86_64
clang: error: linker command failed with exit code 1 (use -v to see invocation)
Those are supposed to be the functions that odbc provides, so I don't know why they're not found. I installed unixodbc using Homebrew, and I'm running OSX 10.13.1