i have some news. With this kind of declaration extern void __fastcall RVExtension(char *output, int outputSize, const char *function){ goRVExtension(output, outputSize, function); };
// export goRVExtension func goRVExtension(output *C.char, outputsize C.size_t, input *C.char) { temp := fmt.Sprintf("Hello %s!", C.GoString(input)) // Return a result to Arma result := C.CString(temp) defer C.free(unsafe.Pointer(result)) var size = C.strlen(result) + 1 if size > outputsize { size = outputsize } C.memmove(unsafe.Pointer(output), unsafe.Pointer(result), size) } i have this error message during the build go : # command-line-arguments Au caractère Ligne:1 : 1 + go build -o armago.dll -buildmode=c-shared armago.go 2> result.txt + ~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~ + CategoryInfo : NotSpecified: (# command-line-arguments:String) [], RemoteException + FullyQualifiedErrorId : NativeCommandError C:\Users\code34\AppData\Local\Temp\go-build126339458\b001\_x002.o: In function `*@RVExtension@12':* C:/Users/code34/go/src/github.com/code34/armago_x64/armago.go:8: multiple definition of `@RVExtension@12' C:\Users\code34\AppData\Local\Temp\go-build126339458\b001\_x001.o:/tmp/go-build/armago.go:8: first defined here C:\Users\code34\AppData\Local\Temp\go-build126339458\b001\_x001.o: In function `@RVExtension@12': /tmp/go-build/armago.go:9: undefined reference to `goRVExtension' C:\Users\code34\AppData\Local\Temp\go-build126339458\b001\_x002.o: In function `@RVExtension@12': C:/Users/code34/go/src/github.com/code34/armago_x64/armago.go:9: undefined reference to `goRVExtension' collect2.exe: error: ld returned 1 exit status # command-line-arguments In file included from _cgo_export.c:4:0: armago.go: In function 'RVExtension': armago.go:9:2: warning: implicit declaration of function 'goRVExtension' [- Wimplicit-function-declaration] # command-line-arguments .\armago.go: In function 'RVExtension': .\armago.go:9:2: warning: implicit declaration of function 'goRVExtension' [-Wimplicit-function-declaration] goRVExtension(output, outputSize, function); ^ as you can see in error message this time the entry point is correctly identified as* @RVExtension@12* (but without underscore) , but i don't succeed to resolv the bug :( -- 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. To view this discussion on the web visit https://groups.google.com/d/msgid/golang-nuts/3986bafb-9f05-4b8d-a7e1-29caa771a926%40googlegroups.com. For more options, visit https://groups.google.com/d/optout.