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.
g++ o my.c my( executable ) -lcairo
where cairo the the lib you are trying to link to , I do not know if there a a solaris build for Netbeans m if there is then download the C++ edition , Netbeans automates a lot of building process.
If you use the -l method of linking, then the compiler will look for either a .a or a .so with the proper name and you have little control over which it chooses. Specifying the library name entirely guarantees which one is used.
If you simply specify the name of the library file on the command line (ending in .a for static or .so for dynamic), the corresponding library will be linked.
Sorry for not getting back to you sooner on this (just been extremely busy lately). Anyway, thanks for the info, it worked perfect. I didn't realize you could directly specify the library name in the compilation/link command. I kept trying to use combinations of the -static and -shared options, along with the -l option. Thanks again!