Skip to content
New issue

Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.

By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.

Already on GitHub? Sign in to your account

Change $JULIA_DIR to $JULIA_PREFIX #10517

Closed
wants to merge 1 commit into from
Closed
Changes from all commits
Commits
File filter

Filter by extension

Filter by extension

Conversations
Failed to load comments.
Loading
Jump to
Jump to file
Failed to load files.
Loading
Diff view
Diff view
4 changes: 2 additions & 2 deletions doc/manual/embedding.rst
Original file line number Diff line number Diff line change
Expand Up @@ -33,9 +33,9 @@ We start with a simple C program that initializes Julia and calls some Julia cod
return 0;
}

In order to build this program you have to put the path to the Julia header into the include path and link against ``libjulia``. For instance, when Julia is installed to ``$JULIA_DIR``, one can compile the above test program ``test.c`` with gcc using::
In order to build this program, you have to put the path to the Julia header into the include path and link against ``libjulia``. For instance, when Julia is installed to ``$JULIA_PREFIX/bin`` (where you are responsible for defining the ``JULIA_PREFIX`` variable appropriately), its header file ``julia.h`` is installed in ``$JULIA_PREFIX/include`` and its library ``libjulia`` is installed in ``$JULIA_PREFIX/lib`` (by default). In this case, you can compile the above ``test.c`` program with gcc using::

gcc -o test -I$JULIA_DIR/include/julia -L$JULIA_DIR/usr/lib -ljulia test.c
gcc -o test -I$JULIA_PREFIX/include/julia -L$JULIA_PREFIX/lib -ljulia test.c

Alternatively, look at the ``embedding.c`` program in the julia source tree in the ``examples/`` folder. The file ``ui/repl.c`` program is another simple example of how to set ``jl_compileropts`` options while linking against libjulia.

Expand Down