Cannot resolve Symbol otl_connect (otl_connect class not including)

294 Views Asked by At

I have been trying to connect to mysql using OTL_ODBC. I have included the OTL header file (otlv4.h) in my Visual Studio 2010 Project but when I try to use otl_connect, it displays the error "Cannot Resolve Symbol otl_connect", and the otl_connect class appears red in colour:

enter image description here

May I know where I'm doing it wrong?

#define OTL_ODBC
#include "otlv4.h"
int main(int argc, char* argv[])
{
  otl_connect db;
}
2

There are 2 best solutions below

1
On

otl_connect is inside namespace odbc. Try odbc::otl_connect.

0
On

I had the same today. The solution was to place #include "otlv4.h" after #define OTL_ODBC_MSSQL_2008.