[Top][All Lists]

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

Problems with libtool libraries when converting Visual Studio 2003 VC7.1

From: laszlo . szakony
Subject: Problems with libtool libraries when converting Visual Studio 2003 VC7.1 project files to gnu autotool files (,
Date: Thu, 20 Jan 2005 11:16:13 +0100


I try to write a conversion utility that converts VC7.1 solution/project files
 to corresponding ( and sets, and I have some problems,
that future releases of libtool may solve.
The philosophy of Microsoft is different from GNU (now: regarding handling of libraries).
Here is an incomplete comparison list:

| Input        |      Output   | Microsoft lib |  GNU libtool lib          |
| obj files    |  static lib   | *.lib         | *.la, *.a, (no)inst       |
| obj files    |  shared lib   | *.lib, *.dll  | *.la, *.yyy,  (no)inst,   |
|              |               | search path   | it should be installed    |
| static libs  |  static lib   | *.lib         | -all-static:Inputs must be|
|              |               |               | uninstalled               |
| static libs  |  shared lib   | *.lib, *.dll  | -L,-l works only for      |
|              |               | search path   | installed inputs          |

The main problem is, that building a static lib from static libs
I need the uninstalled inputs, and building a shared lib
with -L and -l I need the installed ones.

Problem1: Let two input static libs: and and output static lib =
If I define the '-all-static flag', and must be uninstalled.
If I omit the '-all-static' flag, the shared lib for will be built as well.
The static counterpart however will include the static and
The build behavior for the static lib is depends on the '-all-static' flag,
though in my opinion it simply should not build the shared lib.

Problem2: -L and -l are working only for installed libs.
(this is not a problem, if '-all-static' includes installed libs in problem1).
 Microsoft uses flags like -L and -l.

Suggestion: '-all-static' should not influence the way of building the static lib
and the target static lib should include all installed input static libs. Or just have the option to do it.

Question: As VC7.1 project files includes options like -L and -l,
I made a workaround to build an installed and an uninstalled lib (only for static libs) with a suffix '_noi'.
The looks like:

libdir = ${MY_TARGET_DIR}/libs

libst0_la_SOURCES = func_st0.cpp func_st01.cpp
libst0_la_LDFLAGS = -all-static
libst0_la_DEPENDENCIES =

libst0_noi_la_SOURCES = $(libst0_la_SOURCES)
libst0_noi_la_LDFLAGS = $(libst0_la_LDFLAGS)

        mkdir -p $(libdir)/.libs && \
        cp $(libdir) && \
        cp .libs/libst0_noi.a $(libdir)/.libs

Is this OK, or is a better solution to build (and access) both installed and uninstalled libs?


László   Szakony
Philips Austria GmbH
Philips Speech Recognition Systems
Triester Str. 64, A-1101 Vienna  
Tel.+43 1 601 01 2102         Fax +43 1 601 01 4145
E-mail: address@hidden

reply via email to

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