1. 修复 Go 不同架构下 getSystemLibrary 获取的 dll 名
This commit is contained in:
		| @@ -51,9 +51,13 @@ func init() { | |||||||
| func getSystemLibrary() string { | func getSystemLibrary() string { | ||||||
| 	switch runtime.GOOS { | 	switch runtime.GOOS { | ||||||
| 	case "linux": | 	case "linux": | ||||||
| 		return "libc.so.6" | 		if runtime.GOARCH == "amd64" || runtime.GOARCH == "386"{ | ||||||
|  | 			return "libHikNetSDKPkg_linux_amd64.so" | ||||||
|  | 		}else{ | ||||||
|  | 			return " libHikNetSDKPkg_linux_arm64.so" | ||||||
|  | 		} | ||||||
| 	case "windows": | 	case "windows": | ||||||
| 		return "Hikvision_Network_SDK_Packaging_Library.dll" | 		return "HikNetSDKPkg_win_amd64.dll" | ||||||
| 	default: | 	default: | ||||||
| 		panic(fmt.Errorf("GOOS=%s is not supported", runtime.GOOS)) | 		panic(fmt.Errorf("GOOS=%s is not supported", runtime.GOOS)) | ||||||
| 	} | 	} | ||||||
|   | |||||||
		Reference in New Issue
	
	Block a user