Hello
Finaly, Isegal helps me to solve this problem. You can have a complete
description on how to proceed here:
https://github.com/golang/go/issues/32851
Le dimanche 23 juin 2019 13:49:33 UTC+2, nobody nobodye a écrit :
>
> Hello,
>
> I need some assistance to export a GO dll function to a C
hi
don't success to solve this subject. Here an example with the simple code
shown in those slides:
http://akrennmair.github.io/golang-cgo-slides/#10
This code doesn't works anymore, or perhaps there is some special command
line to build it ?
I thought it was possible to create a C function
, Marvin Renich a écrit :
>
> * nicolas_boiteux via golang-nuts >
> [190626 13:19]:
> > /*
> > #include
> > #include
> > #include
> > extern void __stdcall RVExtension(char *output, int outputSize, const
> char
> > *function);
>
Marvin Renich a écrit :
>
> * nicolas_boiteux via golang-nuts >
> [190626 12:15]:
> > i have some news.
> >
> > With this kind of declaration
> > extern void __fastcall RVExtension(char *output, int outputSize, const
> char
> > *func
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
t;> >
>> > Wander if specifying those linker flags via the '-ldflags' command
>> > line option would make a difference:
>> > go help build:
>> > -ldflags '[pattern=]arg list'
>> >arguments to pass on each go tool link invoca
Kapshuk
> > wrote:
> >
> > Wander if specifying those linker flags via the '-ldflags' command
> > line option would make a difference:
> > go help build:
> > -ldflags '[pattern=]arg list'
> > arguments to pass on each go tool link
ou then rebuild your dll and see if the definition of your
>> exported functions changes to _fn_name@arg_size in the output of
>> dumpbin.
>> You can use 'findstr' to filter the output of dumpbin based on a
>> search pattern like so:
>> dumpbin.exe /EXPORTS sl
if the definition of your
> exported functions changes to _fn_name@arg_size in the output of
> dumpbin.
> You can use 'findstr' to filter the output of dumpbin based on a
> search pattern like so:
> dumpbin.exe /EXPORTS slib.dll | findstr "RVExtension"
>
> On Mon,
gt; RVExtension
>> > > RVExtensionArgs
>> > > RVExtensionVersion
>> > >
>> > >
>> > > but for x32
>> > >
>> > > _RVExtension@12
>> > > _RVExtensionArgs@20
>> > > _RVExtensionVersion@8
> but for x32
> > >
> > > _RVExtension@12
> > > _RVExtensionArgs@20
> > > _RVExtensionVersion@8
> > >
> > >
> > > It is very hard for me to explain to you exactly what we need, because
> I am new to this language, and C doesn
ard for me to explain to you exactly what we need, because I
> am new to this language, and C doesn’t know at all. I really hope that you
> understand what I mean.
> >
> > воскресенье, 23 июня 2019 г., 22:20:53 UTC+3 пользователь Kurtis Rader
> написал:
> >>
> >&
thanks you Marvin for this interesting article. You point the real problem
:)
Le dimanche 23 juin 2019 22:55:05 UTC+2, Marvin Renich a écrit :
>
> * nicolas_boiteux via golang-nuts >
> [190623 15:33]:
> > Precisly, i don't know what is this @12, and nobody can explain
("_RVExtension@12", CallingConvention = CallingConvention.Winapi)]
Le dimanche 23 juin 2019 21:20:53 UTC+2, Kurtis Rader a écrit :
>
> On Sun, Jun 23, 2019 at 4:49 AM nicolas_boiteux via golang-nuts <
> golan...@googlegroups.com > wrote:
>
>> I need some assistance to expor
as asked by Jason, i give more information.
I build a 32 bits .dll and there was no error message. When i launch the
dll with the c program, the c program return a generic error message
"method is not recognized" wich happens when the entry point name is wrong.
So the C program expected a
the dll is build but the entry point not works correctly :(
Le dimanche 23 juin 2019 19:10:52 UTC+2, nobody nobodye a écrit :
>
> thanks you for your answer. I will check for this :)
>
> Le dimanche 23 juin 2019 18:58:22 UTC+2, Jason E. Aten a écrit :
>>
>> The @12 part isn't legal as part of a
thanks you for your answer. I will check for this :)
Le dimanche 23 juin 2019 18:58:22 UTC+2, Jason E. Aten a écrit :
>
> The @12 part isn't legal as part of a function name, as the compiler is
> telling you. You must remove it.
>
> On Sunday, June 23, 2019 at 6:49:33 AM UTC-5,
Hello,
I need some assistance to export a GO dll function to a C program.
The C program (wich i m not the author) required to call a function with
this name: _RVExtension@12
so, i simply declare my go function like this:
//export _RVExtension@12
func _RVExtension@12(output *C.char, outputsize
i finaly have it :D in fact, the whole struct of httpbin returns have to be
describe through different structures to works.
package main
import (
"bytes"
"encoding/json"
"fmt"
"net/http"
)
func main() {
type User struct {
Firstname string `json:"firstname"`
and without the use of http.post, the encode / decode methods works :(
i also try this but it doesn't work too.
func main() {
type User struct {
Firstname string `json: "firstname"`
Lastname string `json: "lastname"`
}
type httpbin struct {
Origin string
when i try something like that:
res, _ := http.Post("https://httpbin.org/post;, "application/json;
charset=utf-8", b)
var newuser map[string]interface{}
json.NewDecoder(res.Body).Decode()
fmt.Println(newuser["json"])
it prints me correctly the content a map containing the ID &
i try to parse the return of httpbin :)
Le mardi 14 août 2018 18:00:36 UTC+2, Ian Davis a écrit :
>
>
> On Tue, 14 Aug 2018, at 12:44 PM, nicolas_boiteux via golang-nuts wrote:
>
> the raw of response.body is this
>
>
> {
> "args": {},
> "data&q
uot;: {
"firstname": "Nic",
"lastname": "Raboy"
},
"origin": "i remove my ip :)",
"url": "https://httpbin.org/post;
}
for origin with or without the tag it works
Le mardi 14 août 2018 13:14:40 UT
t;: {
"firstname": "Nic",
"lastname": "Raboy"
},
"origin": "212.194.99.97",
"url": "https://httpbin.org/post;
}
for origin with or without the tag it works
Le mardi 14 août 2018 13:14:40 UT
Hello
I need some assistance to decode a json content
I tried to use only usefull code to do it but don't success to retrieve the
data part of the json result.
var user struct {
Firstname string `json: "firstname"`
Lastname string `json: "lastname"`
Origin string
just opened an issue about that:
https://github.com/golang/go/issues/26952
Le dimanche 12 août 2018 23:19:23 UTC+2, nicolas...@yahoo.fr a écrit :
>
> i don't find any information about this problem :( it doesnt seems to be
> relative to c.cstring cause when i use a simple string "hello" instead
i don't find any information about this problem :( it doesnt seems to be
relative to c.cstring cause when i use a simple string "hello" instead of
the data return the dll crash too.
if i use the same code in .exe it works fine.
Le dimanche 12 août 2018 10:33:54 UTC+2, nicolas...@yahoo.fr a
Hello,
I need some assistance with a little code relative to http.post client that
request a remote json.
jsonData := map[string]string{"firstname": "Nic", "lastname": "Raboy"}
jsonValue, _ := json.Marshal(jsonData)
response, err = http.Post("https://httpbin.org/post;,
g/pkg/unsafe for the exact ways that you are
> permitted to use unsafe.Pointer.
>
> Ian
>
> > Le dimanche 5 août 2018 15:02:47 UTC+2, Jan Mercl a écrit :
> >>
> >> On Sun, Aug 5, 2018 at 2:50 PM nicolas_boiteux via golang-nuts
> >> wrot
why but it seems there was a problem with my
casting method with unsafe
*(*int)(unsafe.Pointer(limit)
Le dimanche 5 août 2018 15:02:47 UTC+2, Jan Mercl a écrit :
>
> On Sun, Aug 5, 2018 at 2:50 PM nicolas_boiteux via golang-nuts <
> golan...@googlegroups.com > wrote:
>
> > n
ode the first time, i run the code, i saw that string array
> contains also other characters that not come from argv.
>
> Le dimanche 5 août 2018 15:02:47 UTC+2, Jan Mercl a écrit :
>>
>> On Sun, Aug 5, 2018 at 2:50 PM nicolas_boiteux via golang-nuts <
>> golan...@googlegroups
Sun, Aug 5, 2018 at 2:50 PM nicolas_boiteux via golang-nuts <
> golan...@googlegroups.com > wrote:
>
> > not sure to understand cause the iteration in your example is done on os
> interface from golang not from c char array :(
>
> Not sure what you mean by 'os inte
not sure to understand cause the iteration in your example is done on os
interface from golang not from c char array :(
Le dimanche 5 août 2018 12:48:20 UTC+2, Jan Mercl a écrit :
>
> On Sun, Aug 5, 2018 at 12:29 PM nicolas_boiteux via golang-nuts <
> golan...@googlegroups
a écrit :
>
> On Sun, Aug 5, 2018 at 12:05 PM nicolas_boiteux via golang-nuts <
> golan...@googlegroups.com > wrote:
>
> > Do you know a standard method to iterate & convert all the argv array in
> one golang string array ?
>
> Something like (not tested):
>
> v
Hello
i have a little problem to convert a C char array to a string array in
golang.
https://community.bistudio.com/wiki/Extensions
func RVExtensionArgs(output *C.char, outputsize C.size_t, input *C.char,
argv **C.char, argc C.size_t) {
temp := fmt.Sprintf("Hello %s %d %s!",
Do you mean we can for example build a GO .dll wich declare an entry point
usable by C/C++ game ?
I can give it a try easily with ARMA game wich load those kind of extension.
Le mardi 13 mars 2018 08:39:02 UTC+1, alex@gmail.com a écrit :
>
> To those talking about using game engines like
Hi
Currently competiting in botters of the galaxy game challenge
https://www.codingame.com/contests/botters-of-the-galaxy
works as other langage.You must now that a part of game development is now
build directly in integration tools as unity, cry engine, proprietary tools
that already have
37 matches
Mail list logo