This is the mail archive of the cygwin@sourceware.cygnus.com mailing list for the Cygwin project.


Index Nav: [Date Index] [Subject Index] [Author Index] [Thread Index]
Message Nav: [Date Prev] [Date Next] [Thread Prev] [Thread Next]

Re: variation on the .dll, .lib, .a theme (help!)


Hi,

On Wed, 9 Jun 1999 14:13:52 +0200 (CEST)
Pontus Lidman <pontus@mathcore.com> 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 (ttathome@remus.dti.ne.jp)




--
Want to unsubscribe from this list?
Send a message to cygwin-unsubscribe@sourceware.cygnus.com


Index Nav: [Date Index] [Subject Index] [Author Index] [Thread Index]
Message Nav: [Date Prev] [Date Next] [Thread Prev] [Thread Next]