Hi
I have a problem with compiling a c++ with ODBC statements inside. Here is a sample:
#include <iostream.h>
#include <iomanip.h>
#include <string.h>
#include <windows.h>
#include <sql.h>
#include <sqlext.h>
void main(){
.../*some code here */...
//SQL Connection Part
SQLHENV henv1; //Environment handler
SQLHDBC hdbc1; //Connection handler
SQLHSTMT hstmt; //Statement handler
//Create environment for SQL operations
SQLAllocHandle(SQL_HANDLE_ENV, SQL_NULL_HANDLE, &henv1);
//Select database driver
SQLConnect(hdbc1, rhost, strlen(rhost), ruser, strlen(ruser), rpassword, strlen(rpassword));
}
The problem is that whenever i add any of SQL functions i get:
Unresolved external 'SQLAllocHandle' referenced from my.obj
Unresolved external 'SQLConnect' referenced from my.obj
I already tried to import those two libraries into compilers lib dir
implib myodbc3.lib c:\winnt\system32\myodbc3.dll and
implib odbc32.lib c:\winnt\system32\odbc32.dll
but the result is the same
Can someone help??
ps. (I'm using borland c++ compiler 5.5)