On a linux system, is it possible to link with both static and dynamic libraries (different libraries, of course) at the same time? I used to do this on a Solaris platform but have been unsuccessful on linux. I can build an executable using all dynamic libraries, or with all static libraries, but I can't mix them up. Is this strictly unique to Solaris? If it is possible, can someone please show me what combination of compiler/linker flags are necessary, and how to use them. Thanks.

Note: This is with the gnu g++ compiler.