#15 Follow Cygwin and MinGW naming convention and build import libraries

open
nobody
None
1
2012-12-18
2012-12-03
Anonymous
No

Following Cygwin and MinGW convention would have some nice consequences:
- people used to them would find the libraries more easily,
- they would now what the liner will pick up first by default.
On cygwin this means having:
- the shared library as cygecl-.dll in bin dir,
- the static library as libecl.a in bin dir
See http://cygwin.com/cygwin-ug-net/dll.html#dll-build
If libtool is used it also generate a libecl.la file in lib dir.
On MinGW its the same except the shared library has prefix lib as well.

Building import library could be useful if someone wants to link with a different linker.
(This file is not needed to link from Cygwin to a dll created by Cygwin, same for MinGW.)
For the Sage project it would also have the nice effect of ensuring that the import library (and so the shared one) is picked up by default before the static one.
There are two possibilities for doing so:
- modify the main compilation command line but that would create two files by one command which can be unexcpected,
- create it after the shared library has been with dlltool but that's a little more overkill.

RedHat has very nice and complete about this stuff as well:
https://access.redhat.com/knowledge/docs/en-US/Red_Hat_Enterprise_Linux/4/html/Using_ld_the_GNU_Linker/win32.html

Discussion


  • Anonymous
    2012-12-18

    Here comes a seemingly working patch.
    One concern may be that the command producing cygecl.dll also produces the import library libecl.dll.a.
    Moreover it does not copy cygecl.dll in lib but only in bin.
    And you have to run autoconf in src directory to update configure.

    I've not changed the MinGW SHAREPREFIX to lib in aclocal.m4 as the links given above would suggest, but that might be a nive thing to do.

     
    Attachments


Anonymous


Cancel   Add attachments