You are viewing a plain text version of this content. The canonical link for it is here.
Posted to pylucene-dev@lucene.apache.org by Andi Vajda <va...@apache.org> on 2010/05/24 20:31:15 UTC

mingw /implib:foo.lib equivalent ?

  Hi Bill,

Would you know what the equivalent mingw gcc flag for MSVC's /implib:foo.lib 
flag is ?
This overrides the default name and location that the linker uses to produce 
a DLLs' import library.

I added some linking tricks on Windows and Linux for supporting the new 
--import funtionality and it seems that hardcoding /implib: is not going to 
work well on mingw or will it ?

Andi..

Re: mingw /implib:foo.lib equivalent ?

Posted by Andi Vajda <va...@apache.org>.
On Mon, 24 May 2010, Bill Janssen wrote:

> Andi Vajda <va...@apache.org> wrote:
>
>>  Hi Bill,
>>
>> Would you know what the equivalent mingw gcc flag for MSVC's
>> /implib:foo.lib flag is ?
>> This overrides the default name and location that the linker uses to
>> produce a DLLs' import library.
>>
>> I added some linking tricks on Windows and Linux for supporting the
>> new --import funtionality and it seems that hardcoding /implib: is not
>> going to work well on mingw or will it ?
>
> Right.
>
> Here's the patch I use (for JCC 2.9.1) on mingw:

Thanks !

Andi..

>
> *** setup.py	2009-10-28 15:24:16.000000000 -0700
> --- setup.py	2010-03-29 22:08:56.000000000 -0700
> ***************
> *** 262,268 ****
>          elif platform == 'win32':
>              jcclib = 'jcc%s.lib' %(debug and '_d' or '')
>              kwds["extra_link_args"] = \
> !                 lflags + ["/IMPLIB:%s" %(os.path.join('jcc', jcclib))]
>              package_data.append(jcclib)
>          else:
>              kwds["extra_link_args"] = lflags
> --- 262,268 ----
>          elif platform == 'win32':
>              jcclib = 'jcc%s.lib' %(debug and '_d' or '')
>              kwds["extra_link_args"] = \
> !                 lflags + ["-Wl,--out-implib,%s" %(os.path.join('jcc', jcclib))]
>              package_data.append(jcclib)
>          else:
>              kwds["extra_link_args"] = lflags
>
> Bill
>

Re: mingw /implib:foo.lib equivalent ?

Posted by Bill Janssen <ja...@parc.com>.
Andi Vajda <va...@apache.org> wrote:

>  Hi Bill,
> 
> Would you know what the equivalent mingw gcc flag for MSVC's
> /implib:foo.lib flag is ?
> This overrides the default name and location that the linker uses to
> produce a DLLs' import library.
> 
> I added some linking tricks on Windows and Linux for supporting the
> new --import funtionality and it seems that hardcoding /implib: is not
> going to work well on mingw or will it ?

Right.

Here's the patch I use (for JCC 2.9.1) on mingw:

*** setup.py	2009-10-28 15:24:16.000000000 -0700
--- setup.py	2010-03-29 22:08:56.000000000 -0700
***************
*** 262,268 ****
          elif platform == 'win32':
              jcclib = 'jcc%s.lib' %(debug and '_d' or '')
              kwds["extra_link_args"] = \
!                 lflags + ["/IMPLIB:%s" %(os.path.join('jcc', jcclib))]
              package_data.append(jcclib)
          else:
              kwds["extra_link_args"] = lflags
--- 262,268 ----
          elif platform == 'win32':
              jcclib = 'jcc%s.lib' %(debug and '_d' or '')
              kwds["extra_link_args"] = \
!                 lflags + ["-Wl,--out-implib,%s" %(os.path.join('jcc', jcclib))]
              package_data.append(jcclib)
          else:
              kwds["extra_link_args"] = lflags

Bill