Author: Wouter van Heyst <wouter.p...@richtlijn.be> Branch: osx-shared Changeset: r75179:0418516e0931 Date: 2014-12-22 20:35 +0200 http://bitbucket.org/pypy/pypy/changeset/0418516e0931/
Log: Note in the embedding tutorial that OSX requires different linking. diff --git a/pypy/doc/embedding.rst b/pypy/doc/embedding.rst --- a/pypy/doc/embedding.rst +++ b/pypy/doc/embedding.rst @@ -97,12 +97,18 @@ return res; } -If we save it as ``x.c`` now, compile it and run it with:: +If we save it as ``x.c`` now, compile it and run it (on linux) with:: fijal@hermann:/opt/pypy$ gcc -o x x.c -lpypy-c -L. fijal@hermann:/opt/pypy$ LD_LIBRARY_PATH=. ./x hello from pypy +on OSX it is necessary to set the rpath of the binary if one wants to link to it:: + + gcc -o x x.c -lpypy-c -L. -Wl,-rpath -Wl,@executable_path + ./x + hello from pypy + Worked! .. note:: If the compilation fails because of missing PyPy.h header file, _______________________________________________ pypy-commit mailing list pypy-commit@python.org https://mail.python.org/mailman/listinfo/pypy-commit