Subject: Re: variation on the .dll, .lib, .a theme (help!)
From: Takayuki Tamura <[email-masked]>
To: [email-masked]
Cc: [email-masked]
Date: Wed, 09 Jun 1999 21:23:57 +0900 (JST)

Hi,

On Wed, 9 Jun 1999 14:13:52 +0200 (CEST)
Pontus Lidman <[email-masked]> wrote:

> cp ml32i1m.lib ML.lib
> echo "EXPORTS" >ML.def
> nm --demangle --defined-only ML.lib | grep ' T ' | sed 's/.* T //' >>ML.def
> dlltool --dllname ML.lib --def ML.def --output-lib libML.a
                       ^^^
This must be .dll which is associated with the .lib.

Doesn't this work?

$ cp SOMEWHERE/ml32i1m.dll ELSEWHERE/ml32i1m.lib .
$ echo "EXPORTS" >ml32i1m.def
$ nm --demangle --defined-only ml32i1m.lib | grep ' T ' | sed 's/.* T //' >>ml32i1m.def
$ dlltool --dllname ml32i1m.lib --def ml32i1m.def --output-lib libml32i1m.a

I put *.dll in the search path, and use the following in my makefile.

lib$(TARGET).a : $(TARGET).lib
	@echo 'Generating $(TARGET).def'
	@echo 'EXPORTS' > $(TARGET).def
	@nm $< | sed -n 's/^.* T _//p' >> $(TARGET).def
	@echo 'Generating lib$(TARGET).a'
	@dlltool -d $(TARGET).def -D `bash -c "type -p $(TARGET).dll"` -l $@
	@rm $(TARGET).def

Regards,
---------------
Takayuki TAMURA ([email-masked])

--
Want to unsubscribe from this list?
Send a message to [email-masked]