I'm trying to build static library using MinGW dlltool in order too link it in GCC. What I have is only a DLL file. I created a *.def file and now I'm trying to make *.a file. However I can't force MinGW dlltool to create antyhing, it only makes an empty file. Here's the console output:
C:\MinGW\bin>dlltool -v -d nlib32.def -l nlib32.a
dlltool: Processing def file: nlib32.def
dlltool: LIBRARY: NCAPI32.dll base: ffffffff
dlltool: Processed def file
dlltool: Processing definitions
dlltool: Processed definitions
dlltool: Creating library file: nlib32.a
dlltool: run: as -o dozwch.o dozwch.s
dlltool: No such file or directory
dlltool: CreateProcess
What's the problem? How can I create the static library file?
I had the exact same problem. Adding C:\MinGW\bin (or wherever your as.exe is located) to system PATH solved it for me.