[Top][All Lists]

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

Re: creating C++ libs contitionally

From: Mattias Barthel
Subject: Re: creating C++ libs contitionally
Date: Mon, 14 Mar 2005 10:06:10 +0100
User-agent: Mozilla Thunderbird 1.0 (Windows/20041206)

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


corename = libbkio

basename = $(corename)


baselibdir = $(MACROPKG_LIBDIR)

#EXTRA_LTLIBRARIES = libbkio.dll



#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

        rm -f $(MACROPKG_LIBDIR)/$(corename)



address@hidden:/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 -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
rm -fr .libs/ .libs/libbkio.* .libs/libbkio.*
ar cru .libs/libbkio.a  bkio.o
ranlib .libs/libbkio.a
(cd .libs && rm -f && ln -s ../
address@hidden:/h/temp/encoders/bkio/src$ l .libs/
.  ..  libbkio.a  libbkio.lai

Am I doing something wrong?



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'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.


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 as libtool

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

$ libtool --version (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 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.


Mattias Barthel, Software Engineer
CapGemini at Hewlett Packard
Tel. 34 93 582 26 02
E-mail: address@hidden

reply via email to

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