Menu

Tree [ecd09e] master / reimp /
 History

HTTPS access


File Date Author Commit
 .cvsignore 2009-09-15 Charles Wilson Charles Wilson [ae3784] Restructure for forthcoming 0.4 release.
 Makefile.am 2010-11-30 Charles Wilson Charles Wilson [ecd09e] Work around optimization bug when compiling reimp
 README 2002-05-26 Luke Dunstan Luke Dunstan [639452] Convert some text files to Unix format
 ar.c 2009-09-15 Charles Wilson Charles Wilson [3dd3c6] Silence build warnings, improve build system
 reimp.c 2010-11-30 Charles Wilson Charles Wilson [c2d563] Portability fix for the reimp tool of mingw-utils
 reimp.h 2010-11-30 Charles Wilson Charles Wilson [c2d563] Portability fix for the reimp tool of mingw-utils
 util.c 2010-11-30 Charles Wilson Charles Wilson [c2d563] Portability fix for the reimp tool of mingw-utils

Read Me

README for reimp
================

* Overview 

`reimp' is a tool to convert Microsoft's new-style (short) import
libraries to import libraries for win32 ports of GNU tools (mingw32,
cygwin).

`reimp' reads an MS import library and writes all imports to the
corresponding .DEF file(s) that it feeds to `dlltool' that creates the
import library.


* Invocation

Usage: reimp [options] IMPLIB

Options:
  -s, --dump-symbols      dump symbols to stdout
  -d, --only-def          only create .def files
  -c, --keep-case         keep case in lib*.a file names
  --dlltool <name>        use <name> for dlltool
  --as <name>             use <name> for assembler

The `--dump-symbols' option makes `reimp' use a quick method for
finding imported symbols and sending the names of found symbols to
stdout. If the input library contain non-imported symbols they will be
listed as well. The output symbols will have all decoration preserved
(i.e '_' will prefix most symbols), so if you feed it to dlltool you
should strip leading underscores. For example

        echo EXPORTS > imp.def
        reimp imp.lib | sed 's/_//' >> imp.def
        dlltool -k --def imp.def --output-lib libimp.a --dllname imp.dll

The `--only-def' option makes `reimp' stop after generating the .DEF
file(s).

By default `reimp' converts all output library names to lower-case. By
using the `keep-case' option `reimp' will use exactly the case of the
DLL imported from when creating an import library. KERNEL32.dll will
generate libKERNEL32.a and not libkernel32.a as it would be default.


* Notes on mixed libraries

If an input library contain regular objects (non-imports, i.e code and
data) `reimp' will write out those objects unless you specify one of
the `--only-def' and `--dump-symbols' options. You probably want to
include those objects as well in the generated library. `reimp'
doesn't do that automatically so you have to do it manually using
`ar', like this

        reimp imp.lib          # this generates several .o or .obj files.
        ar rcs libimp.a *.obj  # add them to library


* Contact information

URL: http://www.acc.umu.se/~anorland/gnu-win32/
Anders Norlander <anorland@hem2.passagen.se>
Want the latest updates on software, tech news, and AI?
Get latest updates about software, tech news, and AI from SourceForge directly in your inbox once a month.