Closed wz2cool closed 8 years ago
I use Windows platform to develop not linux. so my problem is how to install curl in Windows and use it in golang
首先你需要一个MingW/gcc环境,保证你的cgo可以正常工作。 我找到了一份教程 http://itekblog.com/windows-go/#Installingmingw
然后在 curl 页面下载curl的开发binary https://curl.haxx.se/download.html Win64 - MinGW64 一栏。放到MingW对应目录,lib include
大哥谢谢 好像没那个错了 但是开始报其他错,我这个curl 版本比你那个高,我找不到你那个7.22 版本的不知道是不是对应不上,我是小白
C:\Users\Frank\AppData\Local\Temp\go-build560987318\github.com\andelf\go-curl_obj\core.cgo2.o: In function cgo_1aa5c582df5b_Cfunc_curl_getdate': E:/workspace/git/go/src/github.com/andelf/go-curl/core.go:47: undefined reference to
_imp__curl_getdate'
这个是链接错误,一般是找不到lib导致的,你看看你的对应lib文件在不再
大神 我终于折腾好了 我说一下咋弄的,你帮忙看看
终于编译成功了。。。。
@wz2cool 现在看起来有点问题就是 win32不能支持 multi.go 。手头没环境不能整。。
HI, I'm new for golang/c. When I run example, it will throw an exception "..\callback.go:6:23: fatal error: curl/curl.h: No such file or directory". I know I need to install curl but I don't know how to do that. Could you give me more detail to fix this.
我不知道怎么装curl, 能给写详细点么怎么装curl