Skip to content

Commit 0b17865

Browse files
authored
examples: use -Wl,-rpath=. instead of LD_LIBRARY_PATH=. in the call_v_from_c example (#17244)
1 parent 9794a23 commit 0b17865

File tree

1 file changed

+3
-4
lines changed

1 file changed

+3
-4
lines changed

examples/call_v_from_c/README.md

Lines changed: 3 additions & 4 deletions
Original file line numberDiff line numberDiff line change
@@ -7,11 +7,10 @@
77
Step 1: Compile the v code to a shared library using `v -cc gcc -shared v_test_print.v` or
88
`v -cc gcc -shared v_test_math.v`.
99

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`.
10+
Step 2: Compile the c file using `gcc test_print.c v_test_print.so -o test_print -Wl,-rpath=.` or
11+
`gcc test_math.c v_test_math.so -o test_math -Wl,-rpath=.`.
1212

13-
Step 3: Run the compiled c file using `LD_LIBRARY_PATH=. ./test_print` or
14-
`LD_LIBRARY_PATH=. ./test_math`.
13+
Step 3: Run the compiled c file using `./test_print` or `./test_math`.
1514

1615

1716
#### On Mac OSX:

0 commit comments

Comments
 (0)