We read every piece of feedback, and take your input very seriously.
To see all available qualifiers, see our documentation.
There was an error while loading. Please reload this page.
-Wl,-rpath=.
LD_LIBRARY_PATH=.
call_v_from_c
1 parent 9794a23 commit 0b17865Copy full SHA for 0b17865
examples/call_v_from_c/README.md
@@ -7,11 +7,10 @@
7
Step 1: Compile the v code to a shared library using `v -cc gcc -shared v_test_print.v` or
8
`v -cc gcc -shared v_test_math.v`.
9
10
-Step 2: Compile the c file using `gcc test_print.c v_test_print.so -o test_print` or
11
-`gcc test_math.c v_test_math.so -o test_math`.
+Step 2: Compile the c file using `gcc test_print.c v_test_print.so -o test_print -Wl,-rpath=.` or
+`gcc test_math.c v_test_math.so -o test_math -Wl,-rpath=.`.
12
13
-Step 3: Run the compiled c file using `LD_LIBRARY_PATH=. ./test_print` or
14
-`LD_LIBRARY_PATH=. ./test_math`.
+Step 3: Run the compiled c file using `./test_print` or `./test_math`.
15
16
17
#### On Mac OSX:
0 commit comments