I fixed this problem. Apparently settings in my .bashrc are not inherited by launcher applications. I have a ~/lib folder where I would put shared object files I built and added that path it in .bashrc<div><br></div><div><div>
LD_LIBRARY_PATH=~/lib</div><div>export LD_LIBRARY_PATH</div></div><div><br></div><div>I copied the above again in the script which launches lazarus and now I can run/debug tests which reference libSDL2.so from lazarus.</div>