Hello.
Now I tried to just have
<libfoo.la> as baselib_LTLIBRARIES.
But it sure does not create any DLL.

------------------------
AUTOMAKE_OPTIONS = foreign

corename = libbkio

basename = $(corename)

##INCLUDES = -I../include -I$(MACROPKG_INCLUDEDIR) -I$(PYTHON_INCLUDEDIR)
##CXXFLAGS = @CXXFLAGS@ -DSWIG_GLOBAL_MAPPING
INCLUDES = $(CXXINCLUDES)
CXXFLAGS = @CXXFLAGS@ $(ADDITIONAL_CXXFLAGS)

baselibdir = $(MACROPKG_LIBDIR)

#EXTRA_LTLIBRARIES = libbkio.dll libbkio.la

##WANTED_LIBS = @WANTED_LIBS@

baselib_LTLIBRARIES =libbkio.la # $(WANTED_LIBS)

#libbkio_dll_SOURCES = bkio.cpp
#libbkio_dll_LDFLAGS = -shared -L$(MACROPKG_LIBDIR) -llibvhcore

libbkio_la_SOURCES = bkio.cpp #$(libbkio_dll_SOURCES)
libbkio_la_LDFLAGS = -shared -L$(MACROPKG_LIBDIR) -lvhcore

EXTRA_DIST = ../include/bkio.hh

uninstall-local:
        rm -f $(MACROPKG_LIBDIR)/$(corename)c.so

#if INST_HOOK
#CPPFLAGS = -c
#CXXLINK = $(CXXLD) $(AM_CXXFLAGS) $(CXXFLAGS) $(LDFLAGS) -o $(WANTED_LIBS)
#else
#CXXLINK = $(LIBTOOL) --mode=link $(CXXLD) $(AM_CXXFLAGS) $(CXXFLAGS) $(LDFLAGS) -o $@ -rpath $(MACROPKG_LIBDIR)
#endif


MAINTAINERCLEANFILES = Makefile.in

------------------------
[EMAIL PROTECTED]:/h/temp/encoders/bkio/src$ make
/bin/sh ../../libtool --mode=compile c++ -DHAVE_CONFIG_H -I. -I. -I../../config
-I../include -I/c/temp/valhalla/include/vh -I/c/Python22/include -I/c/temp/valha
lla/include -g -O2 -mno-cygwin -D_HOST_LITTLE_ENDIAN -c bkio.cpp
rm -f .libs/bkio.lo
c++ -DHAVE_CONFIG_H -I. -I. -I../../config -I../include -I/c/temp/valhalla/inclu
de/vh -I/c/Python22/include -I/c/temp/valhalla/include -g -O2 -mno-cygwin -D_HOS
T_LITTLE_ENDIAN -Wp,-MD,.deps/bkio.pp -c bkio.cpp -DDLL_EXPORT -DPIC
mv -f bkio.o .libs/bkio.lo
c++ -DHAVE_CONFIG_H -I. -I. -I../../config -I../include -I/c/temp/valhalla/inclu
de/vh -I/c/Python22/include -I/c/temp/valhalla/include -g -O2 -mno-cygwin -D_HOS
T_LITTLE_ENDIAN -Wp,-MD,.deps/bkio.pp -c bkio.cpp >/dev/null 2>&1
mv -f .libs/bkio.lo bkio.lo
/bin/sh ../../libtool --mode=link c++ -g -O2 -mno-cygwin -D_HOST_LITTLE_ENDIAN
-o libbkio.la -rpath /c/temp/valhalla/lib/vh -shared -L/c/temp/valhalla/lib/vh
-lvhcore bkio.lo
libtool: link: warning: undefined symbols not allowed in i686-pc-cygwin shared l
ibraries
rm -fr .libs/libbkio.la .libs/libbkio.* .libs/libbkio.*
ar cru .libs/libbkio.a bkio.o
ranlib .libs/libbkio.a
creating libbkio.la
(cd .libs && rm -f libbkio.la && ln -s ../libbkio.la libbkio.la)
[EMAIL PROTECTED]:/h/temp/encoders/bkio/src$ l .libs/
. .. libbkio.a libbkio.la libbkio.lai
----------------------------



Am I doing something wrong?

Thanks,

Mattias

Ralf Wildenhues wrote:
Hi Matthias,

Please Cc: the automake list on replies, so others can help as well.

* Mattias Barthel wrote on Tue, Mar 01, 2005 at 10:56:50AM CET:

Ralf Wildenhues wrote:

* Mattias Barthel wrote on Wed, Feb 16, 2005 at 06:50:10PM CET:


I am passing my Makefile.am's from 1.4 to 1.6.

You should try to use a *recent* Automake. Like 1.9.x.

I can not, really. We are building a COE Linux (Redhat9) that comes with AM 1.6.


Ouch.


Doing this I have encountered numerous incompatibility problems.


First when starting with 1.4, a part of the problem I bumped in to was that libtool did not really understand .dll as an extension of a lib,
me having to make the Makefiles compatible with Windows.

Libtool libraries are supposed to end in `.la'. The created .la files will be text files containing the real name of the library file(s). Which then may end in .dll, for example.

So, where should I put the dll creation?


Libtool will create libfoo.dll if you specify libfoo.la as libtool
library.


BTW, which Libtool version do you use (try to use a recent one as well).

$ libtool --version ltmain.sh (GNU libtool) 1.3.5 (1.385.2.206 2000/05/27 11:12:27)


Ouch again.


The libs for Windows could also not be dependent of cygwin even tough
the compiling environment was cygwin.

I don't understand this sentence.

Maybe quite unclear put, sorry.
Try no.2:
I am using -mno-cygwin as compiler flag so the libraries can be used outside cygwin. Ie. a windows command prompt.


OK.  I am not very firm with windows issue questions, maybe someone else
can help here.


Also, beeing C++ code libraries I could not use the
AC_LIBTOOL_WIN32_DLL macro in configure.in because
it seems to be dependent of that the lib is
writtien in C.

I don't understand this sentence.

First I was trying to use the autoconf MACRO AC_LIBTOOL_WIN32_DLL to create DLL's in windows but it seems that it only works with C-libs. It complains about the C++ mangling at the end at linkeage time.


Sorry, if you can recreate the problem you encountered here with a
recent Libtool, I might take a look at it.  Please provide a recipe
to expose the bug.

Regards,
Ralf


--
Mattias Barthel, Software Engineer
CapGemini at Hewlett Packard
Tel. 34 93 582 26 02
E-mail: [EMAIL PROTECTED]





Reply via email to