[Top][All Lists]
[Date Prev][Date Next][Thread Prev][Thread Next][Date Index][Thread Index]
windres on mingw32 and cygwin
From: |
Jason Curl |
Subject: |
windres on mingw32 and cygwin |
Date: |
Sat, 13 Dec 2008 16:57:02 +0100 |
User-agent: |
Thunderbird 2.0.0.18 (Windows/20081105) |
Hello,
My next woe when porting over to libtool-2.x. It looks like the
compilation phase of libtool has changed for resources. The shared
library works, but the static library build on mingw32/cygwin no longer
works.
Not sure what I did to completely break it.
Hope somebody can help, the libtool manual contains very little about
windows dlls.
The relevant output of the build is:
/bin/sh ../../libtool --tag=RC --mode=compile windres rsrc.rc -o rsrc.lo
libtool: compile: windres rsrc.rc -o .libs/rsrc.o
libtool: compile: windres rsrc.rc >/dev/null 2>&1
/bin/sh ../../libtool --tag=CC --mode=link gcc -mno-cygwin -g -O2
-no-undefined -version-info 1:0:0 -Wl,--add-stdcall-alias -o libwin.la
-rpath /usr/local/lib version.lo libmain.lo rsrc.lo
libtool: link: rm -fr .libs/libwin.dll.a
libtool: link: gcc -mno-cygwin -shared .libs/version.o .libs/libmain.o
.libs/rsrc.o -mno-cygwin -Wl,--add-stdcall-alias -o
.libs/libwin-1.dll -Wl,--enable-auto-image-base -Xlinker --out-implib
-Xlinker .libs/libwin.dll.a
Creating library file: .libs/libwin.dll.a
libtool: link: ar cru .libs/libwin.a version.o libmain.o rsrc.o
ar: rsrc.o: No such file or directory
make[3]: *** [libwin.la] Error 1
make[3]: Leaving directory `/home/jcurl/winlib/code/libwin/src'
make[2]: *** [all] Error 2
make[2]: Leaving directory `/home/jcurl/winlib/code/libwin/src'
make[1]: *** [all-recursive] Error 1
make[1]: Leaving directory `/home/jcurl/winlib/code/libwin'
It seems like it's put in .libs and not in the same directory as the
source, and this is why it can't link.
I currently do:
configure.ac
LT_INIT([win32-dll])
LT_LANG([Windows Resource])
AM_CONDITIONAL([HAVE_WINDRES], [test x$ac_cv_prog_ac_ct_RC != x])
if test x$ac_cv_c_compiler_gnu = xyes; then
case "$host_os" in
mingw* | cygwin*)
SHLIB_VERSION_ARG="-Wl,--add-stdcall-alias"
;;
*)
;;
esac
fi
AC_SUBST(SHLIB_VERSION_ARG)
WINLIB_VERSION_INFO="1:0:0"
AC_SUBST(WINLIB_VERSION_INFO)
Makefile.am
FILES = main.c
if HAVE_WINDRES
FILES += rsrc.rc
endif
.rc.lo:
$(LIBTOOL) $(AM_LIBTOOLFLAGS) $(LIBTOOLFLAGS) --tag=RC --mode=compile
$(RC) $(RCFLAGS) $< -o $@
libwin_la_LDFLAGS = -no-undefined -version-info @WINLIB_VERSION_INFO@
@SHLIB_VERSION_ARG@
- windres on mingw32 and cygwin,
Jason Curl <=
Re: windres on mingw32 and cygwin, Bob Friesenhahn, 2008/12/13
Re: windres on mingw32 and cygwin, Alon Bar-Lev, 2008/12/13