public inbox for gcc-help@gcc.gnu.org
 help / color / mirror / Atom feed
* creating a dll using a static library
@ 2011-03-18 12:25 Luc MOULINIER
  2011-03-18 14:23 ` Ian Lance Taylor
  2011-03-20  4:27 ` Juan Ramírez
  0 siblings, 2 replies; 5+ messages in thread
From: Luc MOULINIER @ 2011-03-18 12:25 UTC (permalink / raw)
  To: gcc-help

Hello !

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 ?

Many thanks in advance !
Luc



----------------------------------------------------------------
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
----------------------------------------------------------------

^ permalink raw reply	[flat|nested] 5+ messages in thread

* Re: creating a dll using a static library
  2011-03-18 12:25 creating a dll using a static library Luc MOULINIER
@ 2011-03-18 14:23 ` Ian Lance Taylor
  2011-03-18 15:36   ` RE : " Luc MOULINIER
  2011-03-20  4:27 ` Juan Ramírez
  1 sibling, 1 reply; 5+ messages in thread
From: Ian Lance Taylor @ 2011-03-18 14:23 UTC (permalink / raw)
  To: Luc MOULINIER; +Cc: gcc-help

Luc MOULINIER <moumou@igbmc.fr> 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

^ permalink raw reply	[flat|nested] 5+ messages in thread

* RE : creating a dll using a static library
  2011-03-18 14:23 ` Ian Lance Taylor
@ 2011-03-18 15:36   ` Luc MOULINIER
  2011-03-18 18:09     ` Ian Lance Taylor
  0 siblings, 1 reply; 5+ messages in thread
From: Luc MOULINIER @ 2011-03-18 15:36 UTC (permalink / raw)
  To: gcc-help; +Cc: gcc-help

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@google.com]
Date d'envoi : vendredi 18 mars 2011 15:23
À : Luc MOULINIER
Cc : gcc-help@gcc.gnu.org
Objet : Re: creating a dll using a static library

Luc MOULINIER <moumou@igbmc.fr> 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

^ permalink raw reply	[flat|nested] 5+ messages in thread

* Re: RE : creating a dll using a static library
  2011-03-18 15:36   ` RE : " Luc MOULINIER
@ 2011-03-18 18:09     ` Ian Lance Taylor
  0 siblings, 0 replies; 5+ messages in thread
From: Ian Lance Taylor @ 2011-03-18 18:09 UTC (permalink / raw)
  To: Luc MOULINIER; +Cc: gcc-help

Luc MOULINIER <moumou@igbmc.fr> writes:

> 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.

I don't know what the problem is here, but it does not sound like a
problem with gcc.

You may get more help if you ask on the mingw mailing list.

Ian

^ permalink raw reply	[flat|nested] 5+ messages in thread

* Re: creating a dll using a static library
  2011-03-18 12:25 creating a dll using a static library Luc MOULINIER
  2011-03-18 14:23 ` Ian Lance Taylor
@ 2011-03-20  4:27 ` Juan Ramírez
  1 sibling, 0 replies; 5+ messages in thread
From: Juan Ramírez @ 2011-03-20  4:27 UTC (permalink / raw)
  To: gcc-help

why don't you try -lRmath ?


Saludos!
     Juan


On Fri, Mar 18, 2011 at 9:25 AM, Luc MOULINIER <moumou@igbmc.fr> wrote:
> Hello !
>
> 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 ?
>
> Many thanks in advance !
> Luc
>
>
>
> ----------------------------------------------------------------
> 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
> ----------------------------------------------------------------
>

^ permalink raw reply	[flat|nested] 5+ messages in thread

end of thread, other threads:[~2011-03-20  4:27 UTC | newest]

Thread overview: 5+ messages (download: mbox.gz / follow: Atom feed)
-- links below jump to the message on this page --
2011-03-18 12:25 creating a dll using a static library Luc MOULINIER
2011-03-18 14:23 ` Ian Lance Taylor
2011-03-18 15:36   ` RE : " Luc MOULINIER
2011-03-18 18:09     ` Ian Lance Taylor
2011-03-20  4:27 ` Juan Ramírez

This is a public inbox, see mirroring instructions
for how to clone and mirror all data and code used for this inbox;
as well as URLs for read-only IMAP folder(s) and NNTP newsgroup(s).