To be a bit more precise. I'm building an extension for the Tcl language. Extensions are in fact dynmaic libraries.which are loaded in the Tcl language when required. So when loading my .dll lib created as I mentioned, I got the message : couldn't load library "o:/ordali/lib/tclcluspack 0.1/tclcluspack0.1.dll": this library or a depen dent library could not be found in library path while executing "load o:/ordali/lib/tclcluspack0.1/tclcluspack0. 1.dll tclcluspack" The dll is present, and at the right place. Thus, loading it directly in the interpreter results in the same error. A point to mention is that the size of the dll seeems to be correct, as the sum of the libRmath.a + objects. Maybe this helps ... ---------------------------------------------------------------- Dr. Luc Moulinier, Laboratoire de Biologie et Génomique Intégratives IGBMC 1, rue Laurent Fries 67 404 ILLKIRCH Cedex Phone : +33 (0)3 88 65 32 79 ---------------------------------------------------------------- ________________________________________ De : Ian Lance Taylor [iant@xxxxxxxxxx] Date d'envoi : vendredi 18 mars 2011 15:23 À : Luc MOULINIER Cc : gcc-help@xxxxxxxxxxx Objet : Re: creating a dll using a static library Luc MOULINIER <moumou@xxxxxxxx> writes: > I try to create a dynamic library, say toto.dll, using a static library, say libRmath.a. When loading the toto.dll library, an error occurs asking me for the libRmath.a library. > The compilation is done as : > gcc -shared toto.dll f1.o f2.o f3.o -L/c/tcl/lib -ltclstub86 -L. libRmath.a > on Windows, MinGW and gcc 4.5.2 > > Can soneone tell me what is wrong in my compilation ? I don't know what is wrong, but I can tell you that you are much more likely to get help if you tell us the exact error message. Ian