I believe you're using the 'run' button? In that case you should set up a
run configuration with the Environment variabled LD_PRELOAD set. I've not
done this before (I directly load the library using C syntax) so YMMV, but
its the proper way for loading dynamic libraries in Linux.