[Top][All Lists]
[Date Prev][Date Next][Thread Prev][Thread Next][Date Index][Thread Index]
Problem with libtool + Microsoft CL & LINK
From: |
Scott Pakin |
Subject: |
Problem with libtool + Microsoft CL & LINK |
Date: |
Wed, 16 Jan 2002 15:45:51 -0600 |
User-agent: |
Mozilla/5.0 (Windows; U; Windows NT 5.0; en-US; rv:0.9.2) Gecko/20010726 Netscape6/6.1 |
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
[Prev in Thread] |
Current Thread |
[Next in Thread] |
- Problem with libtool + Microsoft CL & LINK,
Scott Pakin <=