Hi All,
Im stuck with this error for a week and I cant move on... Please help me out... I have been trying to compile this simple C program on my AIX machine but getting the below error.
Code:
#include <stdio.h>
#include "sql.h"
#include "sqlext.h"
main() {
SQLHENV env;
char dsn[256];
char desc[256];
SQLSMALLINT dsn_ret;
SQLSMALLINT desc_ret;
SQLUSMALLINT direction;
SQLRETURN ret;
SQLAllocHandle(SQL_HANDLE_ENV, SQL_NULL_HANDLE, &env);
}
I used below compilation and got the error :
Code:
/apps//scripts$gcc data.c -o data
ld: 0711-317 ERROR: Undefined symbol: .SQLAllocHandle
ld: 0711-317 ERROR: Undefined symbol: .SQLExecDirect
ld: 0711-317 ERROR: Undefined symbol: .SQLFreeHandle
ld: 0711-317 ERROR: Undefined symbol: .SQLBindCol
ld: 0711-317 ERROR: Undefined symbol: .SQLFetch
ld: 0711-317 ERROR: Undefined symbol: .SQLDisconnect
ld: 0711-317 ERROR: Undefined symbol: .SQLSetEnvAttr
ld: 0711-317 ERROR: Undefined symbol: .SQLDriverConnect
ld: 0711-317 ERROR: Undefined symbol: .SQLGetDiagRec
ld: 0711-345 Use the -bloadmap or -bnoquiet option to obtain more information.
collect2: ld returned 8 exit status
UNIX odbc is installed in
Code:
/usr/local/easysoft/unixODBC
The header files are located in
Code:
/usr/local/easysoft/unixODBC/include
I copy pasted the header files from here to my current directory and compiled my program.
Don't know what is missing ...
Please throw some light .......