/* #include <stdlib.h> #include <stdio.h> #include <string.h> extern void __stdcall RVExtension(char *output, int outputSize, const char *function); */
//export RVExtensionVersion func RVExtensionVersion(output *C.char, outputsize C.size_t) { result := C.CString("Version 1.0") 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) } with this code ? it compiled but the entry point is not visible via dumpbin Le mercredi 26 juin 2019 18:50:56 UTC+2, Marvin Renich a écrit : > > * nicolas_boiteux via golang-nuts <golan...@googlegroups.com <javascript:>> > [190626 12:15]: > > i have some news. > > > > With this kind of declaration > > extern void __fastcall RVExtension(char *output, int outputSize, const > char > > *function){ > > 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 :( > > My original message (and the link I included) identified leading > underscore and trailing @ and number as being __stdcall, not __fastcall. > Try using __stdcall instead of __fastcall. > > Note that the @RVExtension@12 above has a leading @ instead of _. > > ...Marvin > > -- 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/b4135121-4a95-4b7a-80a0-e6cde4518d3d%40googlegroups.com. For more options, visit https://groups.google.com/d/optout.