UnderWindows, suppose you are going to develop anything without yourfavourate development environment, gcc+emacs+vi, Cygwin definitely willbecome a very good choice for us. However, we are not always relying onthe libraries supplied with Cygwin. We will need Windows style librarydll files. Then how do we link them wil Gcc?
We will need pexports and dlltool.
First, we use pexport to generate the def file.
http://www.emmestech.com/software/cygwi
Then, use dlltool to create the dynamic link library file that can be recognized by cygwin.
Example in my case, to use my DAQ card, there is a dll file:
$ pexports.exe filename.dll > filename.def
$ dlltool.exe --dllname filename.dll --def filename.def --output-lib libfilename.a
Terribly say that I have not tried to test the program working or not. I just successfully compiled the program... :-O
-----------------------Reference--------
http://www.emmestech.com/software/cygwi
http://sebsauvage.net/python/mingw.h
http://www.gnu.org/software/binutils/ma
----------------------------------------
javascript:window.open(this.src);" style="CURSOR: pointer" onload="return imgzoom(this,550)">
文章来源于领测软件测试网 https://www.ltesting.net/