Linker error: unresolved external symbol _SQLGetTypeInfoW

10 views
Skip to first unread message

rvve...@gmail.com

unread,
Nov 13, 2017, 2:07:41 PM11/13/17
to
I am getting following error from Linker while compiling an ODBC client program
that invokes SQLGetTypeInfo().

GetTypesTest.obj : error LNK2001: unresolved external symbol _SQLGetTypeInfoW@8


Any idea what could be wrong?

Here is a snippet of my program where I am calling SQLGetTypeInfo():

retcode = SQLAllocHandle(SQL_HANDLE_STMT, hdbc, &hstmt);
CHECK_ERROR(retcode, "SQLAllocHandle(STMT)",
hstmt, SQL_HANDLE_STMT);

retcode = SQLGetTypeInfo(hstmt, SQL_ALL_TYPES);

The ODBC driver I am using is a Unicode driver for a custom analytical database
that I am using.

I have the following in my compiler options:

/D "_UNICODE" /D "UNICODE"


With above options SQLGetTypeInfo gets mapped to SQLGetTypeInfoW. But where does
reference to _SQLGetTypeInfo() come from?


Thanks,
Ram

rvve...@gmail.com

unread,
Nov 13, 2017, 7:53:59 PM11/13/17
to
The problem is resolved. It was a problem with the ODBC driver(developed by us). The driver wasn't exporting SQLGetTypeInfoW function.

Thanks,
Ram
Reply all
Reply to author
Forward
0 new messages