Re: [Mingw-users] Linking against MSVCR71.DLL
- Date: Fri, 01 Feb 2008 20:30:56 -0800
- From: Brian Dessent <brian@xxxxxxxxxxx>
- Subject: Re: [Mingw-users] Linking against MSVCR71.DLL
Brian Dessent wrote:
> So, it looks like we need to ship multiple versions of libmoldname, to
> match the versions of the runtime, e.g:
>
> libmoldname.a & libmsvcrt.a
> libmoldname70.a & libmsvcr70.a
> libmoldname71.a & libmsvcr71.a
> libmoldname80.a & libmsvcr80.a
I had a go at implementing this. The attached patch modifies
Makefile.in to build the above variants (and 90) of libmoldname. I
verified that this makes the poster's testcase succeed when changing
-lmoldname to -lmoldname71 in the link command.
Brian
2008-02-01 Brian Dessent <brian@xxxxxxxxxxx>
* Makefile.in: Add rules to generate multiple versions
of libmoldname.a for the different runtime versions.
Index: Makefile.in
===================================================================
RCS file: /cvs/src/src/winsup/mingw/Makefile.in,v
retrieving revision 1.80
diff -u -p -r1.80 Makefile.in
--- Makefile.in 27 Nov 2007 02:14:19 -0000 1.80
+++ Makefile.in 2 Feb 2008 04:27:11 -0000
@@ -188,6 +188,8 @@ LIBS = libcrtdll.a \
libmingw32.a \
libcoldname.a \
libmoldname.a libmoldnamed.a \
+ libmoldname70.a libmoldname71.a \
+ libmoldname80.a libmoldname90.a \
$(LIBM_A) \
libmingwthrd.a
@@ -301,17 +303,20 @@ libcoldname.a: moldname-crtdll.def $(MOL
$(AR) rc $@ $(MOLD_OBJS)
$(RANLIB) $@
-libmoldname.a: moldname-msvcrt.def $(MOLD_OBJS)
+libmoldname.a libmoldnamed.a \
+: moldname-msvcrt.def $(MOLD_OBJS)
$(DLLTOOL) --as $(AS) -k -U \
- --dllname msvcrt.dll \
+ --dllname msvcrt$(@:libmoldname%a=%)dll \
--def moldname-msvcrt.def \
--output-lib $@
$(AR) rc $@ $(MOLD_OBJS)
$(RANLIB) $@
-libmoldnamed.a: moldname-msvcrt.def $(MOLD_OBJS)
+libmoldname70.a libmoldname71.a \
+libmoldname80.a libmoldname90.a \
+: moldname-msvcrt.def $(MOLD_OBJS)
$(DLLTOOL) --as $(AS) -k -U \
- --dllname msvcrtd.dll \
+ --dllname msvcr$(@:libmoldname%a=%)dll \
--def moldname-msvcrt.def \
--output-lib $@
$(AR) rc $@ $(MOLD_OBJS)
-------------------------------------------------------------------------
This SF.net email is sponsored by: Microsoft
Defy all challenges. Microsoft(R) Visual Studio 2008.
http://clk.atdmt.com/MRT/go/vse0120000070mrt/direct/01/
_______________________________________________
MinGW-users mailing list
MinGW-users@xxxxxxxxxxxxxxxxxxxxx
You may change your MinGW Account Options or unsubscribe at:
https://lists.sourceforge.net/lists/listinfo/mingw-users