Mingw-utils, reimp, the method of converting library files from msvc format (. Lib) to mingw format (.)

Source: Internet
Author: User
Tags coding standards

Currently, codeblocks and Dev C ++ are not included. You need to download them by yourself, including them in mingw-utils.

Http://sourceforge.net/projects/mingw/files/MinGW/Extension/mingw-utils/

--------------------------------------------------

Http://www.codeguru.com/forum/showthread.php? T = 389098

Reimp Hello.
Where can I get the reimp util? I looked it up on Google, it is suppousd To Be In mingw, I dled all possible versions of it, it is not there.
Any ideas?
 
Re: reimp Http://prdownloads.sourceforge.net/m...ar.gz? Download

Note: with Google, I simply searched for "reimp", and then clicked on the first link, which brought me to a page containing a direct link to the sourceforge.net's project of mingw-utils.

__________________
"Inherit to be reused by code that uses the base class,NotTo reuse base class code ",Sutter and Alexandrescu, C ++ coding standards.
Club of lovers of the C ++ typecasts cute Syntax: only recorded member.

Out of memory happens! Handle it properly!
Say noG_new ()!

--------------------------------------------------

Http://www.appinn.com/freearc-winrar-7-zip-evaluation/

Freearc/WinRAR/7-zip rating

156

ArticleTags: 7z/freearc/WinRAR/compression/Decompression/evaluation.

Xrax168For three compression software (CommercialWinRAR, Open Source7-zip/FreearcThe comparison and evaluation are as follows:

FreearcClaimed to haveWinRAR,7-zipMore than twice the compression speed (under the same compression efficiency), with the arc compression format (only this format can be compressed, rar isWinRARExclusive closed format, other compression software cannot compress this format), can decompress rar, 7z, zip, cab and other common compression formats, the latest stable version is 0.666.

1. Test Environment:

For comparison, I used the latest three Software Versions:7-zip9.19, winrar3.93, and freearc0.666. The machine configuration is Windows 7 Ultimate, CPU: t6570 (dual-core 2.1 GHz, 2 MB level-2 cache), and 2g DDR2 memory. No other software is running during the test. Only the corresponding compression software is running.

2. Test Method:

During compression,FreearcAdopts the arc compression format,WinRARRAR format,7-zipAdopts the 7z format, the compression is set to the default setting, and the compression level is the standard compression mode. during decompression, the corresponding software decompress its own format.The files to be compressed are 233 MB: 357 folders, with a total of 7416 files. These files are mainly text, web pages, Doc, PDF and other file types, because images, music, and videos all have their own compression methods, and the compression software cannot compress much capacity.WinRARSelect multi-threaded mode,7-zipSelect the default 2-thread mode,FreearcThere is no multi-thread option, but the usage of the dual-core CPU during compression should be the default multi-thread mode.

3. The test result is:

A. WinRAR compression timeIt is 58.5 seconds, the compressed file size is 134 MB, and the decompression time is 53 seconds.
B. 7-zip compression timeIt is 93.5 seconds, the compressed file size is 84.2 MB, and the decompression time is 42 seconds.
C. freearc compression timeThe size is 34 seconds, the size of the compressed file is 86.7 MB, the decompression time is 38 seconds, the RAR file is 37.5 seconds, and the 7z file is 38 seconds.

From the test results,FreearcRegardless of the compression time, Decompression Time, and compression efficiency, they are the king.

FreearcIt has Windows and Linux versions and a Simplified Chinese version. You can compress the files into self-extracting files (EXE format) and convert other compressed files to the arc format, with a 256-bit AES and twofish high-strength encryption method, you can integrate common compression and decompression menus into the right-click menu for easy use. The disadvantage is that there is no sharding compression method and no 64-bit version. However, the official team is trying to improve these shortcomings.

FreearcHttp://freearc.org/

In additionXrax168The students did not deal with the official totalcommander plug-in. They need help.

P.s. Niche Weibo: t.sina.com.cn/appinncom

--------------------------------------------------

Http://blog.csdn.net/wanggang999/article/details/3284539

Use the reimp.exe tool provided by mingw. this tool is generally located in the mingw/bin directory, and its readme file is located in the mingw/doc/reimp directory,

The method is simple, for example:

C:/codeblocks/mingw/lib/DX9> reimp d3d8. Lib

A "libd3d8. A" file is generated, which can be used by the mingw-based compiler link.

 

Using this method, I successfully converted the. Lib library of directx9c into the. A library, and compiled the generated DX project under codeblocks,

However, there are three. Lib files that cannot be converted using this method: dxerr. Lib, dxerr8.lib, and dxerr9.lib. Other methods are estimated,

However, it seems that none of them will affect the usage of the dx9c library. If necessary, try again.

 

There is another way, the source is:

Http://topic.csdn.net/t/20040721/11/3195357.htm

I don't know if it is feasible. You can try it.

Both GCC and VC use coff format, so. OBJ. lib and GCC. o. A is the same (in Windows), but the extension is different. Generally, you only need to change the name to OK! However, some databases do not work becauseCodeSome compiler proprietary features may be used.. Lib made with VC may not be compiled (without symbols) in GCC, and vice versa.

 

 

The reimp readme document is as follows:

 

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
Corresponding. Def file (s) that it feeds to 'dltool' that creates
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 example

The '-- dump-symbols' option makes 'reimp 'use a quick method
Finding imported symbols and sending the names of found symbols
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
Shocould 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.
Using the 'Keep-case' option 'reimp 'will use exactly the case of
DLL imported from when creating an import library. kernel32.dll will
Generate libkernel32.a and not libkernel32.a as it wocould 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
The '-- only-Def' and '-- dump-symbols' options. You probably want
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>

Contact Us

The content source of this page is from Internet, which doesn't represent Alibaba Cloud's opinion; products and services mentioned on that page don't have any relationship with Alibaba Cloud. If the content of the page makes you feel confusing, please write us an email, we will handle the problem within 5 days after receiving your email.

If you find any instances of plagiarism from the community, please send an email to: info-contact@alibabacloud.com and provide relevant evidence. A staff member will contact you within 5 working days.

A Free Trial That Lets You Build Big!

Start building with 50+ products and up to 12 months usage for Elastic Compute Service

  • Sales Support

    1 on 1 presale consultation

  • After-Sales Support

    24/7 Technical Support 6 Free Tickets per Quarter Faster Response

  • Alibaba Cloud offers highly flexible support services tailored to meet your exact needs.