Note that there are some explanatory texts on larger screens.

plurals
  1. PO
    primarykey
    data
    text
    <p>On Windows:</p> <pre><code>&gt;go version go version devel +edd229b63fa4 Wed Jun 26 11:36:18 2013 -0700 windows/amd64 &gt;go get -v code.google.com/p/odbc code.google.com/p/odbc (download) code.google.com/p/odbc/api code.google.com/p/odbc &gt;go get -v bitbucket.org/miquella/mgodbc bitbucket.org/miquella/mgodbc (download) bitbucket.org/miquella/mgodbc &gt; </code></pre> <p>On Linux:</p> <pre><code>$ go version go version devel +65e2aba21abe Wed Jun 26 13:14:11 2013 -0700 linux/amd64 $ sudo apt-get install unixodbc unixodbc-dev Reading package lists... Done Building dependency tree Reading state information... Done unixodbc is already the newest version. unixodbc-dev is already the newest version. 0 upgraded, 0 newly installed, 0 to remove and 10 not upgraded. $ go get -v code.google.com/p/odbc code.google.com/p/odbc (download) code.google.com/p/odbc/api code.google.com/p/odbc $ go get -v bitbucket.org/miquella/mgodbc bitbucket.org/miquella/mgodbc (download) bitbucket.org/miquella/mgodbc $ </code></pre> <p>On Darwin, you seem to have issues with SQL header files.</p> <pre><code>/usr/include/sql.h /usr/include/sqlext.h /usr/include/sqltypes.h /usr/include/sqlucode.h </code></pre> <p>Contact the odbc package authors to report these problems.</p> <p>UPDATE:</p> <p>When you tell us about the error</p> <pre><code>mgodbc.go:180: cannot convert &amp;state[0] (type *uint16) to type *_Ctype_SQLWCHAR </code></pre> <p>you don't tell us what the type of _Ctype_SQLWCHAR is. We can only guess! My guess would be that it should look like this</p> <pre><code>package main func main() { type _Ctype_ushort uint16 type _Ctype_WCHAR _Ctype_ushort type _Ctype_SQLWCHAR _Ctype_WCHAR var state [6]uint16 // (*C.SQLWCHAR)(&amp;state[0]) _ = (*_Ctype_SQLWCHAR)(&amp;state[0]) } </code></pre> <p>which compiles with no errors.</p> <p>UPDATE:</p> <p>Use a systematic approach to problem solving.</p> <p>Read about Go build contraints: <a href="http://golang.org/pkg/go/build/" rel="nofollow">Build Constraints, Package build</a>.</p> <p>Read the files in <a href="https://code.google.com/p/odbc/source/browse/api/" rel="nofollow">code.google.com/p/odbc/api</a>.</p> <p>Grep the files in <a href="https://code.google.com/p/odbc/source/browse/api/" rel="nofollow">code.google.com/p/odbc/api</a>.</p> <pre><code>$ grep -r 'linux' * api_unix.go:// +build linux api_unix.go:// #cgo linux LDFLAGS: -lodbc Makefile: GOOS=linux ./mksyscall_unix.pl $^ \ mksyscall_unix.pl:// +build linux mksyscall_unix.pl:// #cgo linux LDFLAGS: -lodbc zapi_unix.go:// +build linux zapi_unix.go:// #cgo linux LDFLAGS: -lodbc $ </code></pre> <p>Clearly, after reading the <code>api_unix.go</code>, <code>zapi_unix.go</code>, <code>mksyscall_unix.pl</code>, and <code>Makefile</code> files, when the <code>api_unix.go</code> file is modified, the <code>zapi_unix.go</code> file should be modified too.</p> <p>You probably didn't do that. Therefore, <code>darwin</code> is not included in the <code>zapi_unix.go</code> build constraints. The package <code>api</code> names that you show as undefined are defined in <code>zapi_unix.go</code>.</p> <pre><code>api.SQLGetData api.SQLBindCol api.SQLDescribeCol api.SQLAllocHandle api.SQLDriverConnect api.SQLDisconnect api.SQLAllocHandle api.SQLSetEnvAttr </code></pre>
    singulars
    1. This table or related slice is empty.
    plurals
    1. This table or related slice is empty.
    1. This table or related slice is empty.
    1. This table or related slice is empty.
    1. VO
      singulars
      1. This table or related slice is empty.
    2. VO
      singulars
      1. This table or related slice is empty.
    3. VO
      singulars
      1. This table or related slice is empty.
 

Querying!

 
Guidance

SQuiL has stopped working due to an internal error.

If you are curious you may find further information in the browser console, which is accessible through the devtools (F12).

Reload