libtool
[Top][All Lists]
Advanced

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

using libtool to create shared library while linking to static library N


From: Stephane Pageau
Subject: using libtool to create shared library while linking to static library NT
Date: Mon, 8 Jul 2002 08:49:08 -0400

I am using libtool and cl on NT to create a dll (.la, .lib, .dll
combination).
[libtool obtained through cygwin, version 1.4e].
To create the dll, I need to link to ws2_32.lib as well as some other libs.
The ws2_32.lib is in the VC98/lib directory while the ws2_32.dll is in the
WINNT/system32 directory. I get the warning below from libtool which leads
to a number of unresolved symbols; this makes me believe that the warning is
actually an error and libtool does not include the libs in the linking
process.

The warning is:
*** Warning: Trying to link with static lib archive
c:/progra~1/micros~4/VC98/Lib/ws2_32.lib.
*** I have the capability to make that library automatically link in when
*** you link to this library.  But I can only do this if you have a
*** shared version of the library, which you do not appear to have
*** because the file extensions .lib of this argument makes me believe
*** that it is just a static archive that I should not used here.

The same warning message is repeated for each one of the libs I am trying to
link with.

Questions:
Can I do what I want to do using libtool? If yes, how? If no, when will
libtool be able to support this linking capability? NOTE that I cannot
create a ws2_32.la since I do not
have source code for the socket library.

The following is my Makefile.am, I tried without the line -no-undefined but
nothing changed.

INCLUDES = -Ic:/projects/ASDEST/PTHREADS/Pre-built/include \
      -Ic:/projects/ASDEST/xerces-c-src1_6_0/src
lib_LTLIBRARIES = libASDEST_CORE.la
libASDEST_CORE_la_SOURCES = asdest.cpp ASDESTException.cpp NameService.cpp
libASDEST_CORE_la_LDFLAGS = -no-undefined
AM_CPPFLAGS = /DASDEST_CORE_DLL_EXPORTS /MDd /W3 /Gm /GR /GX /ZI /GZ
libASDEST_CORE_la_DEPENDENCIES = asdest.h ASDESTExceptions.h asdestxml.h
NameService.h
libASDEST_CORE_la_LIBADD =
c:/projects/ASDEST/xerces-c-src1_6_0/Build/Win32/VC6/Debug/xerces-c_1D.lib \
                                    c:/progra~1/micros~4/VC98/Lib/ws2_32.lib \
                                    
c:/projects/ASDEST/PTHREADS/Pre-built/lib/pthreadVCE.lib

Thanks for your help.
Stephane Pageau





reply via email to

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