In Linux I am using KDevelop as my development tool. Now that I set environment variables in code I had problems running the program from KDevelop. The release version can be copied to a folder with all the needed Firebird files before running it, so this is not a problem.
The problem is with the debug version, since I sometimes need to run it in the debugger to see what is going on. Now the program sets the environment variables so it cannot find Firebird and it does not work.
After some trial and error I decided that the simplest solution was to copy the Firebird embedded files to the folder where the executable is created, so that the program can find the needed files. Then, in KDevelop, I opened the Project/Project Options menu, I chose Run Options and selected Run from the directory where the executable is.
Now I can run the program in the debugger.