mirror of
https://github.com/vlang/v.git
synced 2023-08-10 21:13:21 +03:00
examples: use -Wl,-rpath=.
instead of LD_LIBRARY_PATH=.
in the call_v_from_c
example (#17244)
This commit is contained in:
parent
9794a239b1
commit
0b17865c3d
@ -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:
|
||||
|
Loading…
Reference in New Issue
Block a user