2 ms·
On OS X: gcc stderred.c -D_GNU_SOURCE -Wall -ldl -fPIC -shared -o lib/stderred.dyld alias stderred='DYLD_INSERT_LIBRARIES=$PWD/lib/stderred.dyld DYLD_F
by tlrobinson 15y ago
On OS X:
gcc stderred.c -D_GNU_SOURCE -Wall -ldl -fPIC -shared -o lib/stderred.dyld
alias stderred='DYLD_INSERT_LIBRARIES=$PWD/lib/stderred.dyld DYLD_FORCE_FLAT_NAMESPACE=1'
stderred python -c 'import os; print "Yo!"; os.write(2, "Jola\n\r")'
(replace $PWD with the absolute path if you're adding this to your shell config, of course)
- sickill 15y agoCool, looks like the same gcc flags works for OSX.