January 06, 2006 ODBC compile errors | ||||
---|---|---|---|---|
| ||||
Hello, I need to compile an programm with ODBC 3.0 functions. In the first step I have made an import library for the ODBC driver (o.lib). Then I try to compile with the dmc. I get error messages that seems to show problems with undefined identifier in the dmc header files. To test the source code test8.c I have compiled it successful with another c compiler. I like dmc very and hope there is an workaround for this problem. Here is the output from the dmc: C:\odbc>dmc -o test.exe test8.c o.lib V_OD_erg=SQLAllocHandle(SQL_HANDLE_ENV,SQL_NULL_HANDLE,&V_OD_Env); ^ test8.c(25) : Error: undefined identifier 'SQL_HANDLE_ENV' V_OD_erg=SQLSetEnvAttr(V_OD_Env, SQL_ATTR_ODBC_VERSION, (void*)SQL_OV_O BC3, 0); ^ test8.c(31) : Error: undefined identifier 'SQL_ATTR_ODBC_VERSION' V_OD_erg = SQLAllocHandle(SQL_HANDLE_DBC, V_OD_Env, &V_OD_hdbc); ^ test8.c(39) : Error: undefined identifier 'SQL_HANDLE_DBC' V_OD_erg=SQLAllocHandle(SQL_HANDLE_STMT, V_OD_hdbc, &V_OD_hstmt); ^ test8.c(61) : Error: undefined identifier 'SQL_HANDLE_STMT' V_OD_erg=SQLExecDirect(V_OD_hstmt,"SELECT menu_item_name, menu_item_no FROM menu_item",SQL_NTS); ^ test8.c(75) : Error: need explicit cast for function parameter 2 to get Fatal error: too many errors --- errorlevel 1 Many thanks, Erir |
January 06, 2006 Re: ODBC compile errors | ||||
---|---|---|---|---|
| ||||
Posted in reply to erir | erir wrote: > Hello, > > I need to compile an programm with ODBC 3.0 functions. In the first step > I have made an import library for the ODBC driver (o.lib). > > Then I try to compile with the dmc. I get error messages that seems to > show problems with undefined identifier in the dmc header files. To test > the source code test8.c I have compiled it successful with another c compiler. > > I like dmc very and hope there is an workaround for this problem. > > Here is the output from the dmc: > > > C:\odbc>dmc -o test.exe test8.c o.lib > V_OD_erg=SQLAllocHandle(SQL_HANDLE_ENV,SQL_NULL_HANDLE,&V_OD_Env); > ^ > test8.c(25) : Error: undefined identifier 'SQL_HANDLE_ENV' > V_OD_erg=SQLSetEnvAttr(V_OD_Env, SQL_ATTR_ODBC_VERSION, (void*)SQL_OV_O > BC3, 0); > ^ > test8.c(31) : Error: undefined identifier 'SQL_ATTR_ODBC_VERSION' > V_OD_erg = SQLAllocHandle(SQL_HANDLE_DBC, V_OD_Env, &V_OD_hdbc); > ^ > test8.c(39) : Error: undefined identifier 'SQL_HANDLE_DBC' > V_OD_erg=SQLAllocHandle(SQL_HANDLE_STMT, V_OD_hdbc, &V_OD_hstmt); > ^ > test8.c(61) : Error: undefined identifier 'SQL_HANDLE_STMT' > V_OD_erg=SQLExecDirect(V_OD_hstmt,"SELECT menu_item_name, menu_item_no FROM > menu_item",SQL_NTS); > > ^ > test8.c(75) : Error: need explicit cast for function parameter 2 to get > Fatal error: too many errors > --- errorlevel 1 > I suspect you do not use the lates and greatest ms platform-sdk with DMC , but DMC own outdated SDK? See: http://www.digitalmars.com/faq.html http://cmeerw.org/prog/dm/ms_sdk.html |
Copyright © 1999-2021 by the D Language Foundation