qixiaoning
9 天以前 eac932eb827c93e2e998ac1210c3f5e548af0dbf
1
2
3
4
5
6
7
8
9
10
11
12
13
14
15
16
17
18
19
20
package uniquelCoordinate
 
/*
#cgo LDFLAGS: -Wl,-rpath,/opt/vasystem/libs/opencv3.4.8/lib
#cgo LDFLAGS: -L/opt/vasystem/libs -luniCoord
#include <stdlib.h>
#include "h_interface.h"
 */
import "C"
import "unsafe"
 
func TransCoord(str string) string {
    var csp *C.char = C.CString(str)
    defer C.free(unsafe.Pointer(csp))
 
    cResult := C.transCoord(csp)
    defer C.free(unsafe.Pointer(cResult))
 
    return C.GoString(cResult)  //不需要释放
}