I'm having trouble getting a small package I wrote to build on
Win32 with Microsoft's compiler and linker (using Cygwin for the
Unix toolchain side of things).  Here are the relevant lines from my
Makefile.am:

     lib_LTLIBRARIES = libsimpprof.la
     libsimpprof_la_SOURCES = simpprof.c simpprof_int.h simpprof.h
     libsimpprof_la_LDFLAGS = -no-undefined
     include_HEADERS = simpprof.h

     noinst_PROGRAMS = sptest
     sptest_SOURCES = sptest.c simpprof.h
     sptest_LDADD = libsimpprof.la

That is, I'm trying to build a shared library plus a test program
which uses that library.  The problem I'm encountering is that libtool
is trying to link sptest.obj with ./.libs/libsimpprof.lib, which
doesn't exist:

     /bin/sh ./libtool --mode=link cl  -g   -o sptest.exe  sptest.obj libsimpprof.la

     cl -g -o .libs/sptest.exe sptest.obj  ./.libs/libsimpprof.lib
     Microsoft (R) 32-bit C/C++ Optimizing Compiler Version 12.00.8804 for 80x86
     Copyright (C) Microsoft Corp 1984-1998. All rights reserved.

     Command line warning D4002 : ignoring unknown option '-g'
     Microsoft (R) Incremental Linker Version 6.00.8447
     Copyright (C) Microsoft Corp 1992-1998. All rights reserved.

     /out:sptest.exe
     /out:.libs/sptest.exe
     sptest.obj
     ./.libs/libsimpprof.lib
     LINK : fatal error LNK1181: cannot open input file "./.libs/libsimpprof.lib"
     make[1]: *** [sptest.exe] Error 2

My .libs directory contains the following:

     libsimpprof-0.dll  libsimpprof-0.lib  libsimpprof.lai
     libsimpprof-0.exp  libsimpprof.la

Why is libtool generating libsimpprof-0.lib but trying to link with
libsimpprof.lib?  And how can I convince libtool to use the same
name for both -- without sacrificing portability to other platforms?
I'm using libtool v1.4.2, automake v1.5, and autoconf v2.52.

Thanks in advance,
-- Scott


_______________________________________________
Libtool mailing list
[EMAIL PROTECTED]
http://mail.gnu.org/mailman/listinfo/libtool

Reply via email to