[Top][All Lists]
[Date Prev][Date Next][Thread Prev][Thread Next][Date Index][Thread Index]
Win32 libltdl issue
From: |
Howard Chu |
Subject: |
Win32 libltdl issue |
Date: |
Tue, 26 Apr 2005 05:40:45 -0700 |
User-agent: |
Mozilla/5.0 (Windows; U; Windows NT 5.1; en-US; rv:1.8b2) Gecko/20050419 |
The definition of LT_SCOPE in libltdl/ltdl.h needs a tweak; if some
other DLL (e.g. module 'foo') uses libltdl then it needs to define
LIBLTDL_DLL_IMPORT. Since 'foo' is compiled as a DLL, DLL_EXPORT will
already be automatically defined, resulting in LT_SCOPE getting defined
twice. A quick solution is just to undef it before the second definition:
--- ltdl.h.O 2001-08-13 10:25:49.000000000 -0700
+++ ltdl.h 2005-04-26 05:20:45.044139776 -0700
@@ -131,6 +131,7 @@
# define LT_SCOPE __declspec(dllexport)
# endif
# ifdef LIBLTDL_DLL_IMPORT /* define if linking with this dll */
+# undef LT_SCOPE
# define LT_SCOPE extern __declspec(dllimport)
# endif
# endif
This situation is quite ugly because it means the user's *code* has to
know whether they are linking against a shared or static libltdl, and
it's just not possible to determine this dynamically/automatically at
compile time.
Since LT_SCOPE is only used for the three lt_*alloc/free function
pointers, I suggest removing these declarations completely and using
accessor functions to set/get their values.
--
-- Howard Chu
Chief Architect, Symas Corp. Director, Highland Sun
http://www.symas.com http://highlandsun.com/hyc
Symas: Premier OpenSource Development and Support
- FYI: remove stale reference to libltdl/loaders/Makefile [libtool--gary--1.0--patch-22], Gary V. Vaughan, 2005/04/15
- FYI: remove stale reference to libltdl/loaders/Makefile [libtool--gary--1.0--patch-22], Gary V. Vaughan, 2005/04/25
- Win32 libltdl issue,
Howard Chu <=
- Re: Win32 libltdl issue, Ralf Wildenhues, 2005/04/27
- Re: Win32 libltdl issue, Howard Chu, 2005/04/27
- Re: Win32 libltdl issue, Ralf Wildenhues, 2005/04/27
- Re: Win32 libltdl issue, Howard Chu, 2005/04/27
- Re: Win32 libltdl issue, Bob Friesenhahn, 2005/04/27
- Re: Win32 libltdl issue, Howard Chu, 2005/04/27
- Re: Win32 libltdl issue, Charles Wilson, 2005/04/27
- Re: Win32 libltdl issue, Howard Chu, 2005/04/27
- Re: Win32 libltdl issue, Charles Wilson, 2005/04/28
- Re: Win32 libltdl issue, Ralf Wildenhues, 2005/04/28