How are you starting Geany? If its not in the same environment as the terminal you successfully use gdb under then the loader search path for the shared object might not be the same. This often happens when starting Geany from system menus since they are not a terminal environment.
--- Reply to this email directly or view it on GitHub: https://github.com/geany/geany/issues/837#issuecomment-166398755