Open SandeepR0369 opened 6 years ago
// #include
^ compilation terminated."
It looks like you are using Linux. Do you have sql.h file installed on your system? What directory it is in? Go needs to be able to find that file on your system. You can use CFLAGS command to specify where to find sql.h file, if it cannot be found automatically.
Alex
hi, going to the same problem, but I have different error output:
go/src/github.com/alexbrainman/odbc/api/api_unix.go:149:10: could not determine kind of name for C.SQLGUID
go/src/github.com/alexbrainman/odbc/api/api_unix.go:131:12: could not determine kind of name for C.SQLHANDLE
go/src/github.com/alexbrainman/odbc/api/api_unix.go:133:12: could not determine kind of name for C.SQLHDBC
go/src/github.com/alexbrainman/odbc/api/api_unix.go:132:12: could not determine kind of name for C.SQLHENV
go/src/github.com/alexbrainman/odbc/api/api_unix.go:134:12: could not determine kind of name for C.SQLHSTMT
go/src/github.com/alexbrainman/odbc/api/api_unix.go:141:15: could not determine kind of name for C.SQLINTEGER
go/src/github.com/alexbrainman/odbc/api/api_unix.go:146:10: could not determine kind of name for C.SQLLEN
go/src/github.com/alexbrainman/odbc/api/api_unix.go:143:15: could not determine kind of name for C.SQLPOINTER
go/src/github.com/alexbrainman/odbc/api/api_unix.go:144:15: could not determine kind of name for C.SQLRETURN
go/src/github.com/alexbrainman/odbc/api/api_unix.go:138:15: could not determine kind of name for C.SQLSCHAR
go/src/github.com/alexbrainman/odbc/api/api_unix.go:139:15: could not determine kind of name for C.SQLSMALLINT
go/src/github.com/alexbrainman/odbc/api/api_unix.go:142:15: could not determine kind of name for C.SQLUINTEGER
go/src/github.com/alexbrainman/odbc/api/api_unix.go:147:10: could not determine kind of name for C.SQLULEN
go/src/github.com/alexbrainman/odbc/api/api_unix.go:140:15: could not determine kind of name for C.SQLUSMALLINT
go/src/github.com/alexbrainman/odbc/api/api_unix.go:137:15: could not determine kind of name for C.SQLWCHAR
go/src/github.com/alexbrainman/odbc/api/api_unix.go:112:27: could not determine kind of name for C.SQL_ATTR_AUTOCOMMIT
go/src/github.com/alexbrainman/odbc/api/api_unix.go:120:32: could not determine kind of name for C.SQL_ATTR_CONNECTION_POOLING
go/src/github.com/alexbrainman/odbc/api/api_unix.go:121:32: could not determine kind of name for C.SQL_ATTR_CP_MATCH
go/src/github.com/alexbrainman/odbc/api/api_unix.go:30:26: could not determine kind of name for C.SQL_ATTR_ODBC_VERSION
go/src/github.com/alexbrainman/odbc/api/api_unix.go:56:24: could not determine kind of name for C.SQL_CHAR
go/src/github.com/alexbrainman/odbc/api/api_unix.go:108:17: could not determine kind of name for C.SQL_COMMIT
go/src/github.com/alexbrainman/odbc/api/api_unix.go:122:40: could not determine kind of name for C.SQL_CP_OFF
go/src/github.com/alexbrainman/odbc/api/api_unix.go:123:40: could not determine kind of name for C.SQL_CP_ONE_PER_DRIVER
go/src/github.com/alexbrainman/odbc/api/api_unix.go:124:40: could not determine kind of name for C.SQL_CP_ONE_PER_HENV
go/src/github.com/alexbrainman/odbc/api/api_unix.go:127:40: could not determine kind of name for C.SQL_CP_RELAXED_MATCH
go/src/github.com/alexbrainman/odbc/api/api_unix.go:126:40: could not determine kind of name for C.SQL_CP_STRICT_MATCH
go/src/github.com/alexbrainman/odbc/api/api_unix.go:90:25: could not determine kind of name for C.SQL_C_CHAR
go/src/github.com/alexbrainman/odbc/api/api_unix.go:94:25: could not determine kind of name for C.SQL_C_DOUBLE
go/src/github.com/alexbrainman/odbc/api/api_unix.go:93:25: could not determine kind of name for C.SQL_C_FLOAT
go/src/github.com/alexbrainman/odbc/api/api_unix.go:106:25: could not determine kind of name for C.SQL_C_GUID
go/src/github.com/alexbrainman/odbc/api/api_unix.go:91:25: could not determine kind of name for C.SQL_C_LONG
go/src/github.com/alexbrainman/odbc/api/api_unix.go:95:25: could not determine kind of name for C.SQL_C_NUMERIC
go/src/github.com/alexbrainman/odbc/api/api_unix.go:104:25: could not determine kind of name for C.SQL_C_SBIGINT
go/src/github.com/alexbrainman/odbc/api/api_unix.go:92:25: could not determine kind of name for C.SQL_C_SHORT
go/src/github.com/alexbrainman/odbc/api/api_unix.go:98:25: could not determine kind of name for C.SQL_C_TYPE_TIMESTAMP
go/src/github.com/alexbrainman/odbc/api/api_unix.go:105:25: could not determine kind of name for C.SQL_C_UBIGINT
go/src/github.com/alexbrainman/odbc/api/api_unix.go:102:25: could not determine kind of name for C.SQL_C_WCHAR
go/src/github.com/alexbrainman/odbc/api/api_unix.go:53:21: could not determine kind of name for C.SQL_DATA_AT_EXEC
go/src/github.com/alexbrainman/odbc/api/api_unix.go:64:24: could not determine kind of name for C.SQL_DATETIME
go/src/github.com/alexbrainman/odbc/api/api_unix.go:58:24: could not determine kind of name for C.SQL_DECIMAL
go/src/github.com/alexbrainman/odbc/api/api_unix.go:63:24: could not determine kind of name for C.SQL_DOUBLE
go/src/github.com/alexbrainman/odbc/api/api_unix.go:61:24: could not determine kind of name for C.SQL_FLOAT
go/src/github.com/alexbrainman/odbc/api/api_unix.go:82:24: could not determine kind of name for C.SQL_GUID
go/src/github.com/alexbrainman/odbc/api/api_unix.go:35:20: could not determine kind of name for C.SQL_HANDLE_DBC
go/src/github.com/alexbrainman/odbc/api/api_unix.go:34:20: could not determine kind of name for C.SQL_HANDLE_ENV
go/src/github.com/alexbrainman/odbc/api/api_unix.go:36:20: could not determine kind of name for C.SQL_HANDLE_STMT
go/src/github.com/alexbrainman/odbc/api/api_unix.go:59:24: could not determine kind of name for C.SQL_INTEGER
go/src/github.com/alexbrainman/odbc/api/api_unix.go:40:27: could not determine kind of name for C.SQL_INVALID_HANDLE
go/src/github.com/alexbrainman/odbc/api/api_unix.go:117:20: could not determine kind of name for C.SQL_IS_UINTEGER
go/src/github.com/alexbrainman/odbc/api/api_unix.go:44:27: could not determine kind of name for C.SQL_MAX_MESSAGE_LENGTH
go/src/github.com/alexbrainman/odbc/api/api_unix.go:41:27: could not determine kind of name for C.SQL_NO_DATA
go/src/github.com/alexbrainman/odbc/api/api_unix.go:43:27: could not determine kind of name for C.SQL_NTS
go/src/github.com/alexbrainman/odbc/api/api_unix.go:52:21: could not determine kind of name for C.SQL_NULL_DATA
go/src/github.com/alexbrainman/odbc/api/api_unix.go:45:35: could not determine kind of name for C.SQL_NULL_HANDLE
go/src/github.com/alexbrainman/odbc/api/api_unix.go:47:35: could not determine kind of name for C.SQL_NULL_HDBC
go/src/github.com/alexbrainman/odbc/api/api_unix.go:46:35: could not determine kind of name for C.SQL_NULL_HENV
go/src/github.com/alexbrainman/odbc/api/api_unix.go:48:35: could not determine kind of name for C.SQL_NULL_HSTMT
go/src/github.com/alexbrainman/odbc/api/api_unix.go:57:24: could not determine kind of name for C.SQL_NUMERIC
go/src/github.com/alexbrainman/odbc/api/api_unix.go:28:25: could not determine kind of name for C.SQL_OV_ODBC3
go/src/github.com/alexbrainman/odbc/api/api_unix.go:62:24: could not determine kind of name for C.SQL_REAL
go/src/github.com/alexbrainman/odbc/api/api_unix.go:109:17: could not determine kind of name for C.SQL_ROLLBACK
go/src/github.com/alexbrainman/odbc/api/api_unix.go:60:24: could not determine kind of name for C.SQL_SMALLINT
go/src/github.com/alexbrainman/odbc/api/api_unix.go:38:27: could not determine kind of name for C.SQL_SUCCESS
go/src/github.com/alexbrainman/odbc/api/api_unix.go:39:27: could not determine kind of name for C.SQL_SUCCESS_WITH_INFO
go/src/github.com/alexbrainman/odbc/api/api_unix.go:68:24: could not determine kind of name for C.SQL_TYPE_DATE
go/src/github.com/alexbrainman/odbc/api/api_unix.go:69:24: could not determine kind of name for C.SQL_TYPE_TIME
go/src/github.com/alexbrainman/odbc/api/api_unix.go:70:24: could not determine kind of name for C.SQL_TYPE_TIMESTAMP
go/src/github.com/alexbrainman/odbc/api/api_unix.go:55:24: could not determine kind of name for C.SQL_UNKNOWN_TYPE
go/src/github.com/alexbrainman/odbc/api/api_unix.go:67:24: could not determine kind of name for C.SQL_VARCHAR
go/src/github.com/alexbrainman/odbc/api/api_unix.go:79:24: could not determine kind of name for C.SQL_WCHAR
go/src/github.com/alexbrainman/odbc/api/api_unix.go:81:24: could not determine kind of name for C.SQL_WLONGVARCHAR
go/src/github.com/alexbrainman/odbc/api/api_unix.go:80:24: could not determine kind of name for C.SQL_WVARCHAR
go/src/github.com/alexbrainman/odbc/api/api_unix.go:158:7: could not determine kind of name for C.sqlSetConnectUIntPtrAttr
go/src/github.com/alexbrainman/odbc/api/api_unix.go:153:7: could not determine kind of name for C.sqlSetEnvUIntPtrAttr
gcc errors for preamble:
In file included from go/src/github.com/alexbrainman/odbc/api/api_unix.go:14:0:
/home/vagrant/sqllib/include/sqlext.h:30:1: error: unknown type name 'SQLTCHAR'
typedef SQLTCHAR SQLSTATE[SQL_SQLSTATE_SIZE+1];
^
/home/vagrant/sqllib/include/sqlext.h:1745:1: error: unknown type name 'SQLRETURN'
SQLRETURN SQL_API SQLDriverConnect(
^
/home/vagrant/sqllib/include/sqlext.h:1745:19: error: expected '=', ',', ';', 'asm' or '__attribute__' before 'SQLDriverConnect'
SQLRETURN SQL_API SQLDriverConnect(
^
/home/vagrant/sqllib/include/sqlext.h:1863:1: error: unknown type name 'SQLRETURN'
SQLRETURN SQL_API SQLBrowseConnect(
^
/home/vagrant/sqllib/include/sqlext.h:1863:19: error: expected '=', ',', ';', 'asm' or '__attribute__' before 'SQLBrowseConnect'
SQLRETURN SQL_API SQLBrowseConnect(
^
/home/vagrant/sqllib/include/sqlext.h:1880:1: error: unknown type name 'SQLRETURN'
SQLRETURN SQL_API SQLColAttributes(
^
/home/vagrant/sqllib/include/sqlext.h:1880:19: error: expected '=', ',', ';', 'asm' or '__attribute__' before 'SQLColAttributes'
SQLRETURN SQL_API SQLColAttributes(
^
/home/vagrant/sqllib/include/sqlext.h:1889:1: error: unknown type name 'SQLRETURN'
SQLRETURN SQL_API SQLColumnPrivileges(
^
/home/vagrant/sqllib/include/sqlext.h:1889:19: error: expected '=', ',', ';', 'asm' or '__attribute__' before 'SQLColumnPrivileges'
SQLRETURN SQL_API SQLColumnPrivileges(
^
/home/vagrant/sqllib/include/sqlext.h:1904:1: error: unknown type name 'SQLRETURN'
SQLRETURN SQL_API SQLDescribeParam(
^
/home/vagrant/sqllib/include/sqlext.h:1904:19: error: expected '=', ',', ';', 'asm' or '__attribute__' before 'SQLDescribeParam'
SQLRETURN SQL_API SQLDescribeParam(
^
/home/vagrant/sqllib/include/sqlext.h:1916:1: error: unknown type name 'SQLRETURN'
SQLRETURN SQL_API SQLExtendedFetch(
^
/home/vagrant/sqllib/include/sqlext.h:1916:19: error: expected '=', ',', ';', 'asm' or '__attribute__' before 'SQLExtendedFetch'
SQLRETURN SQL_API SQLExtendedFetch(
^
/home/vagrant/sqllib/include/sqlext.h:1925:1: error: unknown type name 'SQLRETURN'
SQLRETURN SQL_API SQLForeignKeys(
^
/home/vagrant/sqllib/include/sqlext.h:1925:19: error: expected '=', ',', ';', 'asm' or '__attribute__' before 'SQLForeignKeys'
SQLRETURN SQL_API SQLForeignKeys(
^
/home/vagrant/sqllib/include/sqlext.h:1946:1: error: unknown type name 'SQLRETURN'
SQLRETURN SQL_API SQLMoreResults(
^
/home/vagrant/sqllib/include/sqlext.h:1946:19: error: expected '=', ',', ';', 'asm' or '__attribute__' before 'SQLMoreResults'
SQLRETURN SQL_API SQLMoreResults(
^
/home/vagrant/sqllib/include/sqlext.h:1949:1: error: unknown type name 'SQLRETURN'
SQLRETURN SQL_API SQLNativeSql
^
/home/vagrant/sqllib/include/sqlext.h:1949:19: error: expected '=', ',', ';', 'asm' or '__attribute__' before 'SQLNativeSql'
SQLRETURN SQL_API SQLNativeSql
^
/home/vagrant/sqllib/include/sqlext.h:1959:1: error: unknown type name 'SQLRETURN'
SQLRETURN SQL_API SQLNumParams(
^
/home/vagrant/sqllib/include/sqlext.h:1959:19: error: expected '=', ',', ';', 'asm' or '__attribute__' before 'SQLNumParams'
SQLRETURN SQL_API SQLNumParams(
^
/home/vagrant/sqllib/include/sqlext.h:1964:1: error: unknown type name 'SQLRETURN'
SQLRETURN SQL_API SQLParamOptions(
^
/home/vagrant/sqllib/include/sqlext.h:1964:19: error: expected '=', ',', ';', 'asm' or '__attribute__' before 'SQLParamOptions'
SQLRETURN SQL_API SQLParamOptions(
^
/home/vagrant/sqllib/include/sqlext.h:1969:1: error: unknown type name 'SQLRETURN'
SQLRETURN SQL_API SQLPrimaryKeys(
^
/home/vagrant/sqllib/include/sqlext.h:1969:19: error: expected '=', ',', ';', 'asm' or '__attribute__' before 'SQLPrimaryKeys'
SQLRETURN SQL_API SQLPrimaryKeys(
^
/home/vagrant/sqllib/include/sqlext.h:1981:1: error: unknown type name 'SQLRETURN'
SQLRETURN SQL_API SQLProcedureColumns(
^
/home/vagrant/sqllib/include/sqlext.h:1981:19: error: expected '=', ',', ';', 'asm' or '__attribute__' before 'SQLProcedureColumns'
SQLRETURN SQL_API SQLProcedureColumns(
^
/home/vagrant/sqllib/include/sqlext.h:1996:1: error: unknown type name 'SQLRETURN'
SQLRETURN SQL_API SQLProcedures(
^
/home/vagrant/sqllib/include/sqlext.h:1996:19: error: expected '=', ',', ';', 'asm' or '__attribute__' before 'SQLProcedures'
SQLRETURN SQL_API SQLProcedures(
^
/home/vagrant/sqllib/include/sqlext.h:2010:1: error: unknown type name 'SQLRETURN'
SQLRETURN SQL_API SQLSetPos(
^
/home/vagrant/sqllib/include/sqlext.h:2010:19: error: expected '=', ',', ';', 'asm' or '__attribute__' before 'SQLSetPos'
SQLRETURN SQL_API SQLSetPos(
^
/home/vagrant/sqllib/include/sqlext.h:2016:1: error: unknown type name 'SQLRETURN'
SQLRETURN SQL_API SQLTablePrivileges(
^
/home/vagrant/sqllib/include/sqlext.h:2016:19: error: expected '=', ',', ';', 'asm' or '__attribute__' before 'SQLTablePrivileges'
SQLRETURN SQL_API SQLTablePrivileges(
^
/home/vagrant/sqllib/include/sqlext.h:2028:1: error: unknown type name 'SQLRETURN'
SQLRETURN SQL_API SQLDrivers(
^
/home/vagrant/sqllib/include/sqlext.h:2028:19: error: expected '=', ',', ';', 'asm' or '__attribute__' before 'SQLDrivers'
SQLRETURN SQL_API SQLDrivers(
^
/home/vagrant/sqllib/include/sqlext.h:2042:1: error: unknown type name 'SQLRETURN'
SQLRETURN SQL_API SQLBindParameter(
^
/home/vagrant/sqllib/include/sqlext.h:2042:19: error: expected '=', ',', ';', 'asm' or '__attribute__' before 'SQLBindParameter'
SQLRETURN SQL_API SQLBindParameter(
^
/home/vagrant/sqllib/include/sqlext.h:2115:1: error: unknown type name 'SQLRETURN'
SQLRETURN SQL_API SQLSetScrollOptions( /* Use SQLSetStmtOptions */
^
/home/vagrant/sqllib/include/sqlext.h:2115:19: error: expected '=', ',', ';', 'asm' or '__attribute__' before 'SQLSetScrollOptions'
SQLRETURN SQL_API SQLSetScrollOptions( /* Use SQLSetStmtOptions */
^
/home/vagrant/sqllib/include/sqlext.h:2126:1: error: unknown type name 'RETCODE'
RETCODE SQL_API TraceOpenLogFile
^
/home/vagrant/sqllib/include/sqlext.h:2126:17: error: expected '=', ',', ';', 'asm' or '__attribute__' before 'TraceOpenLogFile'
RETCODE SQL_API TraceOpenLogFile
^
/home/vagrant/sqllib/include/sqlext.h:2133:1: error: unknown type name 'RETCODE'
RETCODE SQL_API TraceCloseLogFile(); /* Request to close a trace log */
^
/home/vagrant/sqllib/include/sqlext.h:2133:17: error: expected '=', ',', ';', 'asm' or '__attribute__' before 'TraceCloseLogFile'
RETCODE SQL_API TraceCloseLogFile(); /* Request to close a trace log */
^
/home/vagrant/sqllib/include/sqlext.h:2134:1: error: unknown type name 'VOID'
VOID SQL_API TraceReturn(RETCODE,RETCODE); /* Processes trace after FN is called */
^
/home/vagrant/sqllib/include/sqlext.h:2134:17: error: expected '=', ',', ';', 'asm' or '__attribute__' before 'TraceReturn'
VOID SQL_API TraceReturn(RETCODE,RETCODE); /* Processes trace after FN is called */
^
/home/vagrant/sqllib/include/sqlext.h:2135:1: error: unknown type name 'DWORD'
DWORD SQL_API TraceVersion(); /* Returns trace API version */
^
/home/vagrant/sqllib/include/sqlext.h:2135:17: error: expected '=', ',', ';', 'asm' or '__attribute__' before 'TraceVersion'
DWORD SQL_API TraceVersion(); /* Returns trace API version */
^
/home/vagrant/sqllib/include/sqlext.h:2142:1: error: unknown type name 'RETCODE'
RETCODE SQL_API TraceVSControl(DWORD);
^
/home/vagrant/sqllib/include/sqlext.h:2142:17: error: expected '=', ',', ';', 'asm' or '__attribute__' before 'TraceVSControl'
RETCODE SQL_API TraceVSControl(DWORD);
^
/home/vagrant/sqllib/include/sqlext.h:2152:1: error: unknown type name 'BOOL'
BOOL SQL_API ODBCSetTryWaitValue(DWORD dwValue); /* In seconds */
^
/home/vagrant/sqllib/include/sqlext.h:2152:17: error: expected '=', ',', ';', 'asm' or '__attribute__' before 'ODBCSetTryWaitValue'
BOOL SQL_API ODBCSetTryWaitValue(DWORD dwValue); /* In seconds */
^
/home/vagrant/sqllib/include/sqlext.h:2153:1: error: unknown type name 'DWORD'
DWORD SQL_API ODBCGetTryWaitValue(); /* In Milliseconds(!) */
^
/home/vagrant/sqllib/include/sqlext.h:2153:17: error: expected '=', ',', ';', 'asm' or '__attribute__' before 'ODBCGetTryWaitValue'
DWORD SQL_API ODBCGetTryWaitValue(); /* In Milliseconds(!) */
^
/home/vagrant/sqllib/include/sqlext.h:2163:5: error: unknown type name 'GUID'
const GUID *pguidEvent; /* the GUID for event */
^
/home/vagrant/sqllib/include/sqlext.h:2164:5: error: unknown type name 'DWORD'
DWORD dwFlags; /* flags for the call */
^
/home/vagrant/sqllib/include/sqlext.h:2166:9: error: unknown type name 'WCHAR'
WCHAR *wszArg;
^
/home/vagrant/sqllib/include/sqlext.h:2167:9: error: unknown type name 'CHAR'
CHAR *szArg;
^
/home/vagrant/sqllib/include/sqlext.h:2170:9: error: unknown type name 'WCHAR'
WCHAR *wszCorrelation;
^
/home/vagrant/sqllib/include/sqlext.h:2171:9: error: unknown type name 'CHAR'
CHAR *szCorrelation;
^
/home/vagrant/sqllib/include/sqlext.h:2173:5: error: unknown type name 'RETCODE'
RETCODE RetCode;
^
/home/vagrant/sqllib/include/sqlext.h:2175:1: error: unknown type name 'VOID'
VOID SQL_API FireVSDebugEvent(PODBC_VS_ARGS);
^
/home/vagrant/sqllib/include/sqlext.h:2175:17: error: expected '=', ',', ';', 'asm' or '__attribute__' before 'FireVSDebugEvent'
VOID SQL_API FireVSDebugEvent(PODBC_VS_ARGS);
^
go/src/github.com/alexbrainman/odbc/api/api_unix.go:17:1: error: unknown type name 'SQLRETURN'
SQLRETURN sqlSetEnvUIntPtrAttr(SQLHENV environmentHandle, SQLINTEGER attribute, uintptr_t valuePtr, SQLINTEGER stringLength) {
^
go/src/github.com/alexbrainman/odbc/api/api_unix.go:17:32: error: unknown type name 'SQLHENV'
SQLRETURN sqlSetEnvUIntPtrAttr(SQLHENV environmentHandle, SQLINTEGER attribute, uintptr_t valuePtr, SQLINTEGER stringLength) {
^
go/src/github.com/alexbrainman/odbc/api/api_unix.go:17:59: error: unknown type name 'SQLINTEGER'
SQLRETURN sqlSetEnvUIntPtrAttr(SQLHENV environmentHandle, SQLINTEGER attribute, uintptr_t valuePtr, SQLINTEGER stringLength) {
^
go/src/github.com/alexbrainman/odbc/api/api_unix.go:17:101: error: unknown type name 'SQLINTEGER'
SQLRETURN sqlSetEnvUIntPtrAttr(SQLHENV environmentHandle, SQLINTEGER attribute, uintptr_t valuePtr, SQLINTEGER stringLength) {
^
go/src/github.com/alexbrainman/odbc/api/api_unix.go:21:1: error: unknown type name 'SQLRETURN'
SQLRETURN sqlSetConnectUIntPtrAttr(SQLHDBC connectionHandle, SQLINTEGER attribute, uintptr_t valuePtr, SQLINTEGER stringLength) {
^
go/src/github.com/alexbrainman/odbc/api/api_unix.go:21:36: error: unknown type name 'SQLHDBC'
SQLRETURN sqlSetConnectUIntPtrAttr(SQLHDBC connectionHandle, SQLINTEGER attribute, uintptr_t valuePtr, SQLINTEGER stringLength) {
^
go/src/github.com/alexbrainman/odbc/api/api_unix.go:21:62: error: unknown type name 'SQLINTEGER'
SQLRETURN sqlSetConnectUIntPtrAttr(SQLHDBC connectionHandle, SQLINTEGER attribute, uintptr_t valuePtr, SQLINTEGER stringLength) {
^
go/src/github.com/alexbrainman/odbc/api/api_unix.go:21:104: error: unknown type name 'SQLINTEGER'
SQLRETURN sqlSetConnectUIntPtrAttr(SQLHDBC connectionHandle, SQLINTEGER attribute, uintptr_t valuePtr, SQLINTEGER stringLength) {
going to the same problem, but I have different error output:
@finalight you have completely different problem. @sandeepr0963 could not find sql.h file to include to compile Cgo. Your system seems to have include files, but it could not compile C code generated by Cgo:
/home/vagrant/sqllib/include/sqlext.h:30:1: error: unknown type name 'SQLTCHAR' typedef SQLTCHAR SQLSTATE[SQL_SQLSTATE_SIZE+1]; ^
You need to understand why your C compiler fails with this error. And your include looks unusual. What ODBC library do you use? How did you installed it? Did you see https://github.com/alexbrainman/odbc/wiki ? You might follow instructions there to see if that works for you.
Alex
install unixODBC*
all packages on linux (not only unixODBC or unixodbc), that installs dev version with headers.
Alex, please add this to wiki.
Alex, please add this to wiki.
@covrom wiki is editable by everyone, so you should be able to make changes yourself. Feel free to adjust wiki. Thank you.
Alex
Hey! I'm on an M1 MacBook Pro. For ARM64 machines homebrew installs to /opt/homebrew instead of /usr/local. What is your suggestion on getting this to work? Creating symlinks of literally every file in my homebrew path inside of /usr/local is insanely tedius.
Hey! I'm on an M1 MacBook Pro. For ARM64 machines homebrew installs to /opt/homebrew instead of /usr/local. What is your suggestion on getting this to work?
I assume you created separate issue about your problem. I replied there https://github.com/alexbrainman/odbc/issues/153#issuecomment-817647458
Alex
trying to install go package by using "go get github.com/alexbrainman/odbc". But getting error as follow: "go/src/github.com/alexbrainman/odbc/api/api_unix.go:13:18: fatal error: sql.h: No such file or directory // #include
^
compilation terminated."
checked for unixODBC::"-bash-4.2$ sudo yum install unixODBC Loaded plugins: fastestmirror, langpacks Repository cloudera-manager is listed more than once in the configuration cloudera-manager | 951 B 00:00:00 Loading mirror speeds from cached hostfile Package unixODBC-2.3.1-11.el7.x86_64 already installed and latest version Nothing to do"