[Top][All Lists]
[Date Prev][Date Next][Thread Prev][Thread Next][Date Index][Thread Index]
RE: libltdl for MinGW32 and native compilers
From: |
Jon Leichter |
Subject: |
RE: libltdl for MinGW32 and native compilers |
Date: |
Tue, 29 Jan 2002 09:24:54 -0800 |
Stefan. I have had the same concerns as you. I have brought up a similar
topic in the past. Even with your patch, DLL_EXPORT is a flawed macro name.
I'd suggest the following patch:
#ifdef LIBLTDL_DLL_IMPORT
# define LT_SCOPE __declspec(dllimport) extern
#elif defined (LIBLTDL_DLL_EXPORT)
# define LT_SCOPE __declspec(dllexport) extern
#endif
Of course, IMHO, references to DLL_EXPORT in ltmain.sh should also be
removed.
Jon
> -----Original Message-----
> From: address@hidden [mailto:address@hidden Behalf Of
> stefan
> Sent: Tuesday, January 29, 2002 3:03 AM
> To: address@hidden
> Subject: libltdl for MinGW32 and native compilers
>
>
> Dear list,
> The attached patch is meant to fix problems with the libltdl.dll
> under Windows. It attaches LT_SCOPE to each exported/imported symbol.
> Furthermore it changes
>
> #ifdef DLL_EXPORT
> # define LT_SCOPE __declspec(dllexport)
> #endif
> #ifdef LIBLTDL_DLL_IMPORT
> # define LT_SCOPE extern __declspec(dllimport)
> #endif
>
> into
>
> #ifdef LIBLTDL_DLL_IMPORT
> # define LT_SCOPE __declspec(dllimport) extern
> #elif defined (DLL_EXPORT)
> # define LT_SCOPE __declspec(dllexport) extern
> #endif
>
> This fixes the following problem: With the above order you *cannot* use
> the libltdl.dll from another dll, because the dll would define DLL_EXPORT
> and LIBLTDL_DLL_IMPORT concurrently.
>
> Do you agree? And will you apply the patch?
>
> Thanks in advance,
> address@hidden
>