The message box shown at the end of optimised compilation will tell you what has been merged into the application and which, if any, dlls need to be copied with the exe to the device.
To merge the source code of a library just place it in the Basic4ppc Desktop/Libraries folder and it will be automatically merged next time you compile. The message box shown afterwards will confirm this. It is not necessary to put the dll there for an external library, just the source code.