Undefined reference to error with cgo

Hi
I wanted to use https://github.com/mikepb/go-serial for my arduino serial communication in windows 10, I don’t have enough experience in cgo so I needed some help to solve this error:

libs\serial/windows.c:345: undefined reference to __imp_SetupDiGetClassDevsA' libs\serial/windows.c:358: undefined reference to__imp_SetupDiOpenDevRegKey’
libs\serial/windows.c:350: undefined reference to __imp_SetupDiEnumDeviceInfo' libs\serial/windows.c:376: undefined reference to__imp_CM_Get_Parent’
libs\serial/windows.c:379: undefined reference to __imp_CM_Get_DevNode_Registry_PropertyA' libs\serial/windows.c:396: undefined reference to__imp_SetupDiDestroyDeviceInfoList’
libs\serial/windows.c:404: undefined reference to __imp_CM_Get_Device_IDA' libs\serial/windows.c:383: undefined reference to__imp_SetupDiDestroyDeviceInfoList’
C:\Users\WIN10\AppData\Local\Temp\go-build009774722\b002_x007.o: In function get_usb_details': libs\serial/windows.c:286: undefined reference to__imp_SetupDiEnumDeviceInfo’
libs\serial/windows.c:293: undefined reference to __imp_SetupDiEnumDeviceInterfaces' libs\serial/windows.c:298: undefined reference to__imp_SetupDiGetDeviceInterfaceDetailA’
libs\serial/windows.c:306: undefined reference to __imp_SetupDiGetDeviceInterfaceDetailA' libs\serial/windows.c:332: undefined reference to__imp_SetupDiDestroyDeviceInfoList’

This topic was automatically closed 90 days after the last reply. New replies are no longer allowed.