<p dir="auto"><a href="https://github.com/JuliaLang/julia/blob/master/doc/manual/embedding.rst">https://github.com/JuliaLang/julia/blob/master/doc/manual/embedding.rst</a></p>
<p dir="auto">The advice on compiling the test:</p>
<div class="snippet-clipboard-content notranslate position-relative overflow-auto" data-snippet-clipboard-copy-content="gcc -o test -I$JULIA_DIR/include/julia -L$JULIA_DIR/usr/lib -ljulia test.c"><pre class="notranslate"><code class="notranslate">gcc -o test -I$JULIA_DIR/include/julia -L$JULIA_DIR/usr/lib -ljulia test.c
</code></pre></div>
<p dir="auto">is wrong. For a start the directory $JULIA_DIR/include/julia doesn't exist.</p>
<p dir="auto">This also affects the embedding example <a href="https://github.com/JuliaLang/julia/blob/master/examples/embedding.c">https://github.com/JuliaLang/julia/blob/master/examples/embedding.c</a> as the manual page above seems to be the goto advice on how to compile it.</p>
<p dir="auto">See <a href="https://groups.google.com/forum/#!topic/julia-users/BfXg93CHLrM" rel="nofollow">google user group question</a>.</p>
<p dir="auto">I was trying to follow this guide: <a href="http://julia.readthedocs.org/en/latest/manual/embedding/" rel="nofollow">http://julia.readthedocs.org/en/latest/manual/embedding/</a>. I ran into an error on the first example.</p>
<p dir="auto">I have the latest prerelease downloaded for OS X from <a href="http://julialang.org/downloads/" rel="nofollow">http://julialang.org/downloads/</a>. I have<br>
<code class="notranslate">JULIA_DIR=/Applications/Julia-0.3.0-prerelease-a673e4c4de.app/Contents/Resources/julia</code><br>
I got the example to compile with<br>
<code class="notranslate">gcc -o test -I$JULIA_DIR/include/julia -L$JULIA_DIR/lib/julia -ljulia test.c</code>, but not with <code class="notranslate">gcc -o test -I$JULIA_DIR/include/julia -L$JULIA_DIR/usr/lib -ljulia test.c</code> as in the guide.</p>
<p dir="auto">When I ran the test executable, I got an error:</p>
<div class="snippet-clipboard-content notranslate position-relative overflow-auto" data-snippet-clipboard-copy-content="dyld: Library not loaded: @rpath/libjulia.dylib
  Referenced from: /Users/stevend2/PythonProjects/ParallelSparseMatMul.jl/./test
  Reason: image not found
[1]    2528 trace trap  ./test"><pre class="notranslate"><code class="notranslate">dyld: Library not loaded: @rpath/libjulia.dylib
  Referenced from: /Users/stevend2/PythonProjects/ParallelSparseMatMul.jl/./test
  Reason: image not found
[1]    2528 trace trap  ./test
</code></pre></div>
<p dir="auto">Any ideas on what's going on? I'd really appreciate your help.</p>