On Tue, 2003-01-07 16:49:29 +0530, Mohammed Khalid Ansari wrote in message : > > Hi, > > If /usr/lib contains both static and shared libraries of the same name > eg odbc, which library compiler is going to take if I do.. > > gcc file.c -lodbc > > How do I explicitly I define which library to take during compilation. "-l" is commonly used for shared libraries. If you want to statically link some library into your program, simply name it's file name as one of the object file names which are to be linked. But beware! Libs need to be on the end of your file list. MfG, JBG -- Jan-Benedict Glaw jbglaw@lug-owl.de . +49-172-7608481 "Eine Freie Meinung in einem Freien Kopf | Gegen Zensur fuer einen Freien Staat voll Freier Bürger" | im Internet! Shell Script APT-Proxy: http://lug-owl.de/~jbglaw/software/ap2/