[Top][All Lists]

[Date Prev][Date Next][Thread Prev][Thread Next][Date Index][Thread Index]

crosscompiling dll linux->mingw32

From: Guido Draheim
Subject: crosscompiling dll linux->mingw32
Date: Thu, 26 Apr 2001 11:05:54 +0200

hi everyone,

I am still trying to crosscompile a dll on linux with the new
autotools series. Currently I use cvs-autoconf, automake-1.4d
and libtool-1.4 on top of cross-tools.

I did just need to change a single line in which 
enabled me afterwards to actually *build* a dll.

---       Wed Apr 25 01:35:10 2001
+++   Thu Apr 26 03:02:17 2001
@@ -2330,7 +2330,7 @@
        if test "$allow_undefined" = yes; then
          if test "$allow_undefined_flag" = unsupported; then
            $echo "$modename: warning: undefined symbols not allowed in $host 
shared libraries" 1>&2
-           build_libtool_libs=no
+           build_libtool_libs=yes

also I noticed, that in `configure` $lt_target is not set
anymore (I have a line to extra-delete -lm from $LIBS). With
these little changes, crosscompiling a dll works actually.

now for the more interesting stuff ;-)

There is also a little exe-program that uses that dll.
But "make install" will fail at that step. the package
is called "pfe" and I thought to create a pfe.exe that
uses a pfe.dll in the system. It turns out that things
are a bit different, anyway here are the files been built:


The "make install" will make a copy of the dll including
the lib-prefix and version-number, no "pfe.dll" is created. 
Well, I am not sure whether that is the intended behaviour,
I'd expect something different. Anyway, the real bad day
comes from the fact, that the pfe.exe is *not* copied, and
looking into the Makefile(.in) showed, that there are *two*
lines of bin_PROGRAMS ... the last one said pfe$(EXEEXT).
The install-binPROGRAMS-target will check for the existance
of the file to be installed, but pfe.exe does not exist in 
the base-builddir, only in the .libs-buildsubdir. Removing
the second bin_PROGRAMS line, a `libtool install pfe`  is
entered which will barf at me saying that there is no
.libs/pfe to be found. Oh no! well then, I made a copy of
.libs/pfe.exe to a version without the .exe, and finally,
the make-install did complete.... creating a bin/$host-pfe.exe

anyone can explain this behaviour... and have an idea
how to fix it?

as a side-note: the .exe works fine, as long as the .dll
is copied over from ./lib to ./bin - the i*-pfe.exe seems to
be dependent on libpfe-0-30-96.dll. After resolving the
usual win-problems with exported nonfunction items, I was
even able to build a libtool -module .dll but I have not
come so far to dynaload it. Actually, there is a good chance
that the new autotools series will be able to compile a
dll with a linux-based crosscompiler, or so it seems.

-- guido                           
31:GCS/E/S/P C++$++++ ULHS L++w- N++@  d(+-) s+a- h.r(*@)>+++ y++

reply via email to

[Prev in Thread] Current Thread [Next in Thread]