Calling V from C section too small #15754
Replies: 4 comments 7 replies
-
Without trying I guess the problem is |
Beta Was this translation helpful? Give feedback.
-
Try this. a.v: module a
[export: 'my_custom_c_name']
fn foo() {
println("foo")
} b.c: void my_custom_c_name();
int main()
{
my_custom_c_name();
} $ v -shared a.v
$ gcc b.c a.so
$ LD_LIBRARY_PATH=. ./a.out
foo |
Beta Was this translation helpful? Give feedback.
-
Thanks everyone for all your replies. I made a pull request that sum up the information you gave. Here is the link : #15844 |
Beta Was this translation helpful? Give feedback.
-
On my macbook I needed to use: |
Beta Was this translation helpful? Give feedback.
Uh oh!
There was an error while loading. Please reload this page.
-
Hello,
I want to call V from C. But since the documentation is really short, I don't know how I can do it.
This is what I've tried:
In a.v:
In b.c:
And in cmd, I execute
gcc b.c
and I got:Is it possible to be more clear about this section please ?
Beta Was this translation helpful? Give feedback.
All reactions