A different set of dynamic libraries could be loaded by IDE because your application inherits a different environment which is then used by the dynamic linker to find the libs. See dyld manpage for environment variables that could affect the dynamic linker's behavior. Your IDE should have options to control this.
If you still want to ensure your app is run from a process which doesn't have your IDE as ancestor you can configure the IDE to run a command like this:
bash -c 'your_app &'
this will make bash run your_app in the background and exit. When parent process (here: bash) exits, the child (here: your_app) is adopted by the init process, meaning that init (PID=1) becomes its parent. Again however, this will not have an effect on the libraries loaded.
You could also run a server script which waits for a signal (using trap command) and executes your app when it receives it. Your IDE should then be configured to run a kill command to send the signal to the server. This way you will be running your app in the same environment as your terminal. This is probably an overkill solution.
My recommendation is to attempt to configure IDE so that the right libraries are used by the child process.