libtool
[Top][All Lists]
Advanced

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

Re: MSW DLLs support in libtool


From: Evgeny Grin
Subject: Re: MSW DLLs support in libtool
Date: Fri, 12 Feb 2016 22:51:44 +0300
User-agent: Mozilla/5.0 (Windows NT 6.1; WOW64; rv:38.0) Gecko/20100101 Thunderbird/38.5.1

-----BEGIN PGP SIGNED MESSAGE-----
Hash: SHA256



On 12.02.2016 20:29, Evgeny Grin wrote:
> 
> 
> On 12.02.2016 17:28, Nick Bowler wrote:
>> On 2/12/16, Evgeny Grin <address@hidden> wrote:
>>> Actually, no. See:
> 
>> Just to be sure:
>> Here you are running libtool installed on the system (by path lookup)...
> 
>> [...]
>>> /bin/sh ../../libtool  --tag=CC   --mode=link gcc -fvisibility=hidden
>> [...]
>> ...here you are running a copy of libtool bundled with a package.
>> They are not necessarily the same version.
> They are the same. Project was just reconfigured.
> To be sure:
> $ ./libtool --version
> libtool (GNU libtool) 2.4.6
> Written by Gordon Matzigkeit, 1996
> 
> 
>> It would be better to provide a test case that others can run.
> I used GNU libmicrohttpd and added to libs extra static-only library by
> 
> $ make LIBS=-ltdbcstub103
> 
> You can even add non-existing library - result will be the same. Project
> can be any autotools/libtool project.
> I will create minimal working example later.

Minimal example:
configure.ac
- --------------------
AC_INIT([libtool_test_01],[0.1.0],address@hidden)
AM_INIT_AUTOMAKE([foreign])
LT_INIT([win32-dll])
AC_CONFIG_MACRO_DIR([m4])
AC_PROG_CC
AC_CONFIG_FILES([Makefile])
LDFLAGS="$LDFLAGS -no-undefined"
AC_OUTPUT
- --------------------

Makefile.am
- --------------------
ACLOCAL_AMFLAGS = -I m4

lib_LTLIBRARIES = libtool_test_01.la

libtool_test_01_la_SOURCES = libtool_test_01.c
- --------------------

libtool_test_01.c
- --------------------
__declspec(dllexport) int simple_func(int a)
{ return a + 2; }
- --------------------

Run:
$ mkdir m4
$ autoreconf -i
$ ./configure --disable-static
$ make

Build lib fine. But:
$ make clean
$ make LIBS=-lnonexistlib
{skip}
*** Since this library must not contain undefined symbols,
*** because either the platform does not support them or
*** it was explicitly requested with -no-undefined,
*** libtool will only create a static version of it.

Versions:
$ ./libtool --version
libtool (GNU libtool) 2.4.6
Written by Gordon Matzigkeit, 1996

$ autoconf --version
autoconf (GNU Autoconf) 2.69
Copyright (C) 2012 Free Software Foundation, Inc.

$ automake --version
automake (GNU automake) 1.15
Copyright (C) 2014 Free Software Foundation, Inc.

$ libtoolize --version
libtoolize (GNU libtool) 2.4.6
Written by Gary V. Vaughan <address@hidden>, 2003


- -- 
Best Wishes,
Evgeny Grin
-----BEGIN PGP SIGNATURE-----
Version: GnuPG v2

iQEcBAEBCAAGBQJWvjfQAAoJEL96xKXqwrr0gEIH/jd3sBgGp2Lo2ompPwd90kep
aVCzfeebBF3ABuwZ3VNTL/jEurPPSWL3sH9OAuef9wnZSOgWC0s4qtNxj6tsqaSB
+tEmN6bmr4YdQyljz6MqT2Hb54IL6FU1Yp9zHweHuBVodRFJBExUFBHjfoT7P7ew
PES3aeSsEAXziK0t8qqN8MpYiq4FN595tRcy9yFpzbzSuFn4Icmt8GjybcubT+pX
lgZJ5DRrdDeiamGnLVpOTNlA+5E22hYw5wVuEScOjxVXJj+uuxFvuGJDJlez9wjj
tlwNHj0X+bMm6GLxSp/p9PvqQ6jH2kInO/SuoU7T0DCDcDofJ2XTIceNnXjbM+w=
=F7e6
-----END PGP SIGNATURE-----



reply via email to

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