R
R
Roman Rakzin2016-07-24 19:14:13
C++ / C#
Roman Rakzin, 2016-07-24 19:14:13

How to use c or c++ code in golang?

Please tell me a simple example of using a function from c \ c++ in a golang program.
For example, in c \ c ++ there will be a function sayHello returning the value - "Hi, Roman, this is the value from the function." This is the text I want to get in a golang program.
How to do it? I read - you still need to install the gcc compiler. Can you please give examples.
Thanks

Answer the question

In order to leave comments, you need to log in

1 answer(s)
M
Mark Doe, 2016-07-24
@mourr

For example, through cgo - https://golang.org/cmd/cgo/
Well, an example of this:
rextester.com/TLV57435

Didn't find what you were looking for?

Ask your question

Ask a Question

731 491 924 answers to any question