From 0b17865c3dd3725b877b6863574dead714039ba0 Mon Sep 17 00:00:00 2001 From: Mehmet Ali Date: Wed, 8 Feb 2023 10:44:10 +0300 Subject: [PATCH] examples: use `-Wl,-rpath=.` instead of `LD_LIBRARY_PATH=.` in the `call_v_from_c` example (#17244) --- examples/call_v_from_c/README.md | 7 +++---- 1 file changed, 3 insertions(+), 4 deletions(-) diff --git a/examples/call_v_from_c/README.md b/examples/call_v_from_c/README.md index b6f72eda2..3d65b4627 100644 --- a/examples/call_v_from_c/README.md +++ b/examples/call_v_from_c/README.md @@ -7,11 +7,10 @@ Step 1: Compile the v code to a shared library using `v -cc gcc -shared v_test_print.v` or `v -cc gcc -shared v_test_math.v`. -Step 2: Compile the c file using `gcc test_print.c v_test_print.so -o test_print` or -`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=.`. -Step 3: Run the compiled c file using `LD_LIBRARY_PATH=. ./test_print` or -`LD_LIBRARY_PATH=. ./test_math`. +Step 3: Run the compiled c file using `./test_print` or `./test_math`. #### On Mac OSX: -- 2.39.5