Program linking on Windows with Mingw+MSYS
Steven Edwards
steven_ed4153 at yahoo.com
Fri Oct 10 18:33:45 CDT 2003
We should really eat our own dogfood here as we do when building dlls.
I cant build the avitools on windows with mingw as they lack a
libmsvfw32.a and other programs fail to link such as wineconsole and
the user applications due to mingw bugs. With this patch I can now
build all the programs except winedbg.
Thanks
Steven
Changelog:
Link to WINE import libs when building programs.
Index: programs/Makeprog.rules.in
===================================================================
RCS file: /home/wine/wine/programs/Makeprog.rules.in,v
retrieving revision 1.30
diff -u -r1.30 Makeprog.rules.in
--- programs/Makeprog.rules.in 24 Sep 2003 19:01:44 -0000 1.30
+++ programs/Makeprog.rules.in 10 Oct 2003 23:28:50 -0000
@@ -38,7 +38,7 @@
# Rules for .exe main module
$(MODULE): $(ALL_OBJS) $(RCOBJS) Makefile.in
- $(CC) $(ALL_OBJS) $(RCOBJS) -o $@ $(DELAYIMPORTS:%=-l%)
$(IMPORTS:%=-l%) $(ALL_LIBS)
+ $(CC) $(ALL_OBJS) $(RCOBJS) -o $@ -L$(DLLDIR) $(DELAYIMPORTS:%=-l%)
$(IMPORTS:%=-l%) $(ALL_LIBS)
# Rules for testing
Index: programs/avitools/Makefile.in
===================================================================
RCS file: /home/wine/wine/programs/avitools/Makefile.in,v
retrieving revision 1.35
diff -u -r1.35 Makefile.in
--- programs/avitools/Makefile.in 24 Sep 2003 19:01:44 -0000 1.35
+++ programs/avitools/Makefile.in 10 Oct 2003 23:28:50 -0000
@@ -37,13 +37,13 @@
$(LDSHARED) $(LDDLLFLAGS) -o $@ icinfo.o icinfo.exe.spec.o
$(ALL_LIBS) -lc
aviinfo.exe: aviinfo.o
- $(CC) -o $@ aviinfo.o -lkernel32 $(ALL_LIBS)
+ $(CC) -o $@ aviinfo.o -L$(DLLDIR) -lkernel32 $(ALL_LIBS)
aviplay.exe: aviplay.o
- $(CC) -o $@ aviplay.o -lddraw -lkernel32 $(ALL_LIBS)
+ $(CC) -o $@ aviplay.o -L$(DLLDIR) -lddraw -lkernel32 $(ALL_LIBS)
icinfo.exe: icinfo.o
- $(CC) -o $@ icinfo.o -lmsvfw32 -lkernel32 $(ALL_LIBS)
+ $(CC) -o $@ icinfo.o -L$(DLLDIR) -lmsvfw32 -lkernel32 $(ALL_LIBS)
$(PROGRAMS:.exe=): $(WINEWRAPPER)
$(RM) $@ && $(LN_S) $(WINEWRAPPER) $@
__________________________________
Do you Yahoo!?
The New Yahoo! Shopping - with improved product search
http://shopping.yahoo.com
More information about the wine-patches
mailing list