Using the tool Reimp.exe included with MinGW, the tool is typically in the MinGW in directory, and its readme document is in the Mingwdoc eimp directory,
The method is simple, for example:
C:codeblocksmingwlibdx9>reimp D3d8.lib
A "libd3d8.a" file is generated, which allows the MinGW-based compiler link to be used.
I used this method to successfully convert the directx9c Lib library into a. A library and compile the DX project it generated under Codeblocks.
But there are three. lib files that cannot be converted by this method: DxErr.lib, DxErr8.lib, DxErr9.lib, estimating other methods,
But it does not seem that they do not affect the use of dx9c Library, first of all, if you need to find a way.
There is also a way to source:
Http://topic.csdn.net/t/20040721/11/3195357.htm
Do not know whether it is feasible, you can try.
Both GCC and VC use the COFF format, so the. obj Lib in the VC is the same as the. O. A for GCC (under Windows), just the extension is different, usually you just change the name is OK! However, some libraries do not, because the code in the library may use some compiler-specific features, VC do. Lib may not compile (missing symbols) under GCC, and vice versa.
Reimp's Readme document reads 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 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 Use for Dlltool
--as Use 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 would be
Listed as well. The output symbols'll has all decoration preserved
(i.e ' _ ' would prefix most symbols), so if you feed it to Dlltool
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 ' would use exactly the case of the
DLL imported from when creating an import library. KERNEL32.dll would
Generate libkernel32.a and not libkernel32.a as it would is default.
* Notes on Mixed libraries
If an input library contain regular objects (non-imports, i.e code and
Data) ' Reimp ' would 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 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
If there is no reimp, download
http://download.csdn.net/detail/viewlolcs/8197589
or download Mingw-utils
Http://sourceforge.net/projects/mingw/files/MinGW/Utilities/mingw-utils/mingw-utils-0.3/mingw-utils-0.3.tar.gz/download
Download mingw-utils-0.3.tar.gz, unzip and copy the Reimp to MinGW bin directory.
Using Reimp and Dlltool
Go under cmd
CD c:/mysql/lib/opt
Reimp-d Libmysql.lib
Dlltool-k-D libmysql.def-l LIBMYSQL.A
Reference article:
StdCall and DLL tools of MSVC and mingwhttp://www.willus.com/mingw/yongweiwu_stdcall.html there is another saying, for reference:There are no Reimp.exe, Dumpbin.exe, Pexports.exe in MinGW .2014-09-19 20:01yawangzhiwen | Browse 721 times Programming Languages
I downloaded the mingw4.6.2 and installed, but the lack of some of the implementation of files, such as the title of a few, which eldest brother can put the full EXE file under the bin to send a copy, thank you. please send to [email protected]
Share to: Report | 2014-09-19 21:06Do not play "crazy rock Climbing" you are out!The questioner is adopted by
Reimp is obsolete, mingw4.6.2 Lib and VC Lib is universal.
DUMPBIN and Pexports are VC proprietary, MinGW itself is not but there are other alternative tools.
Ask:
I also installed VS, why the command line inside the call prompt, Reimp is not an external or internal command or the like?
Chase Answer:
Reimp has been canceled Ah, there is no such thing. Only the old version of MinGW. Now MinGW can directly use the VC lib.
Ask:
Can you tell me what command to build the. so file? Look at the previous posts and use the commands you just said. I haven't been exposed to these things before.
Chase Answer:
MinGW now generates a generic DLL that compiles directly into a DLL, which does not change. G++.exe-c md5dllmain.cpp-o md5dllmain.o-i "C:/programming/mingw/include" -dbuilding_dll=1 Dllwrap.exe-- Output-def Libmd5dll.def--driver-name C + +--implib LIBMD5DLL.A md5dllmain.o -L "c:/programming/mingw/lib"-- No-export-all-symbols--add-stdcall-alias -o md5dll.dll above is an example.
-
Questioner evaluation
-
Thank you!
http://blog.csdn.net/libaineu2004/article/details/47783637
The static link library used under QT------*.lib converted to a static library of the. A format used by MinGW.