andelf / go-curl

golang curl(libcurl) binding.
Apache License 2.0
485 stars 131 forks source link

Error on using go get to install your packages in go1 #3

Closed thorn1976 closed 12 years ago

thorn1976 commented 12 years ago

Hello andelf,

I just wanted to try your package on my machine (Ubuntu 11.10, 64bit / go 1), but on issuing the "go get" command from your readme, I get the following error-messages from go :

go get -u github.com/andelf/go-curl/curl

github.com/andelf/go-curl/curl

1: error: 'CURL_VERSION_NTLM_WB' undeclared (first use in this function) 1: note: each undeclared identifier is reported only once for each function it appears in 1: error: 'CURLOPT_CLOSESOCKETDATA' undeclared (first use in this function) 1: error: 'CURLOPT_CLOSESOCKETFUNCTION' undeclared (first use in this function)

Kind regards Thomas

andelf commented 12 years ago

hi thorn1976, can you post your curl --version? . :) btw, my env is ArchLinux 64bit. go 1

@thorn1976

thorn1976 commented 12 years ago

Hello andelf,

thx for your quick reply. The output of a "curl --version" on the machine is

curl --version curl 7.21.6 (x86_64-pc-linux-gnu) libcurl/7.21.6 OpenSSL/1.0.0e zlib/1.2.3.4 libidn/1.22 librtmp/2.3 Protocols: dict file ftp ftps gopher http https imap imaps ldap pop3 pop3s rtmp rtsp smtp smtps telnet tftp Features: GSS-Negotiate IDN IPv6 Largefile NTLM SSL libz

Hope I could help :)

Kind regards Thomas

andelf commented 12 years ago

@thorn1976 official document said that

CURLOPT_CLOSESOCKETDATA
Pass a pointer that will be untouched by libcurl and passed as te first argument in the closesocket callback set with CURLOPT_CLOSESOCKETFUNCTION. (Option added in 7.21.7)

note that Option added in 7.21.7. I'll update the code soon for backwards compatibility. :)

andelf commented 12 years ago

I've just committed a fix. can you help to try it? @thorn1976

thorn1976 commented 12 years ago

Hi andelf,

just tried your fix, but it seems there is one error left (?)

go get -u github.com/andelf/go-curl/curl

github.com/andelf/go-curl/curl

1: error: 'CURL_VERSION_NTLM_WB' undeclared (first use in this function) 1: note: each undeclared identifier is reported only once for each function it appears in

Kind regards Thomas

2012/4/1 Feather.et.ELF reply@reply.github.com:

I've just committed a fix. can you help to try it? @thorn1976


Reply to this email directly or view it on GitHub: https://github.com/andelf/go-curl/issues/3#issuecomment-4867263

andelf commented 12 years ago

..... because CURL_VERSION_NTLM_WB is used in const.go but I add it to core.go wrongly....

so ... hava a try again..

andelf commented 12 years ago

fixed in commit #64362f223e https://github.com/andelf/go-curl/commit/64362f223e076e12e146cb9fa8945dc9e3e8059e?w=1

thorn1976 commented 12 years ago

Thx a lot - compiles without problems now :)