Skip to content
New issue

Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.

By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.

Already on GitHub? Sign in to your account

编译报错 #43

Closed
zskylark opened this issue Sep 1, 2021 · 2 comments
Closed

编译报错 #43

zskylark opened this issue Sep 1, 2021 · 2 comments

Comments

@zskylark
Copy link

zskylark commented Sep 1, 2021

环境:
go version go1.16.7 windows/amd64

gcc version 5.3.0

TDengine-client-2.0.20.13-Windows-x64.exe

使用:
import (
"database/sql"
"fmt"
_ "github.com/taosdata/driver-go/taosSql"

编译报错:

github.com/taosdata/driver-go/taosSql

C:\Users\XXX\AppData\Local\Temp\go-build2056628199\b167_x003.o: In function _cgo_3c14f7af3093_Cfunc_taosGetErrno': /tmp/go-build/cgo-gcc-prolog:63: undefined reference to taosGetErrno'
C:\Users\XXX\AppData\Local\Temp\go-build2056628199\b167_x003.o: In function _cgo_3c14f7af3093_Cfunc_taos_is_null': /tmp/go-build/cgo-gcc-prolog:278: undefined reference to taos_is_null'
C:\Users\XXX\AppData\Local\Temp\go-build2056628199\b167_x003.o: In function _cgo_3c14f7af3093_Cfunc_taos_stmt_is_insert': /tmp/go-build/cgo-gcc-prolog:470: undefined reference to taos_stmt_is_insert'
C:\Users\XXX\AppData\Local\Temp\go-build2056628199\b167_x003.o: In function _cgo_3c14f7af3093_Cfunc_tstrerror': /tmp/go-build/cgo-gcc-prolog:581: undefined reference to tstrerror'
collect2.exe: error: ld returned 1 exit status

Compilation finished with exit code 2

@huskar-t
Copy link
Collaborator

huskar-t commented Sep 1, 2021

@zskylark try to use branch win
fix go.mod
require github.com/taosdata/driver-go/taosSql win
then execute go mod tidy

@zskylark
Copy link
Author

zskylark commented Sep 1, 2021

@huskar-t it's working, thanks!

Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
None yet
Projects
None yet
Development

No branches or pull requests

2 participants