I think the correct C type is used. 

refer: https://github.com/ebfe/scard/blob/master/scard_unix.go 
Line 57:

func scardGetStatusChange(ctx uintptr, timeout uint32, states 
[]scardReaderState) Error {
       r := C.SCardGetStatusChange(C.SCARDCONTEXT(ctx), C.DWORD(timeout), 
(C.LPSCARD_READERSTATE)(unsafe.Pointer(&states[0])), C.DWORD(len(states)))
       return Error(r)




On Tuesday, April 4, 2017 at 9:44:41 AM UTC+8, Ian Lance Taylor wrote:
>
> On Mon, Apr 3, 2017 at 5:53 PM, clashion <clas...@gmail.com <javascript:>> 
> wrote: 
> > 
> > I tried to compile the code from https://github.com/ebfe/scard . 
> > 
> > Error during compilation. 
> > 
> > 
> > Environment: go1.8 , linux 
> > 
> > 
> > Error Message: 
> > 
> > 
> > cgo-gcc-prolog:198:2: warning: passing argument 3 of 
> ‘SCardGetStatusChange’ 
> > from incompatible pointer type [enabled by default] 
> > 
> > 
> > /usr/include/PCSC/winscard.h:64:16: note: expected ‘LPSCARD_READERSTATE’ 
> but 
> > argument is of type ‘struct *’ 
> > PCSC_API LONG SCardGetStatusChange(SCARDCONTEXT hContext, 
> > 
> > 
> > 
> > Need advice how to solve this. Thanks. 
>
> You are using cgo code.  This error comes from the C compiler.  You 
> need to use the correct type in your C code. 
>
> Ian 
>

-- 
You received this message because you are subscribed to the Google Groups 
"golang-nuts" group.
To unsubscribe from this group and stop receiving emails from it, send an email 
to golang-nuts+unsubscr...@googlegroups.com.
For more options, visit https://groups.google.com/d/optout.

Reply via email to