no dlfcn.h on MSYS (MINGW32) building on Windows

Slava Pestov slava at jedit.org
Thu Aug 4 22:55:22 PDT 2005


One more thing -- to get the effect of dlopen(NULL) (handle on current 
image), use GetModuleHandle(NULL).

Slava

Slava Pestov wrote:
> Hi,
> 
> The code needs to be changed to use the Win32 API for dynamic loading, 
> which maps 1-1 onto the Unix API:
> 
> dlopen  --> HMODULE LoadLibrary(char *path)
> dlsym   --> void *GetProcAddress(HMODULE lib, char *sym)
> dlclose --> void FreeLibrary(HMODULE lib)
> 
> Slava
> 
> Paul Dufresne wrote:
> 
>> Hi!, been a long time, and I regret to inform you that I did
>> not played with Slate for a long time now (no news in GUI).
>>
>> Anyway I'm trying to build Slate on MSYS. I've installed libtool but
>> when trying to build slate-current under MSYS I get:
>> ===
>> libtool --mode=compile gcc -O2 -fomit-frame-pointer -DNDEBUG=1 -s
>> -I../../../../../src/mobius/vm/platform/includes -I. -I../../../../..
>> -DSLATE_DATADIR=\"/usr/share/slate\" -o extprim.o -c extprim.c
>>  gcc -O2 -fomit-frame-pointer -DNDEBUG=1 -s
>>  -I../../../../../src/mobius/vm/platform/includes -I. -I../../../../..
>>  -DSLATE_DATADIR=\"/usr/share/slate\" -c extprim.c  -DDLL_EXPORT -DPIC
>>  -o .libs/extprim.o
>> extprim.c:2:19: dlfcn.h: No such file or directory
>> extprim.c: In function `openExternalLibrary':
>> extprim.c:41: error: `RTLD_NOW' undeclared (first use in this function)
>> ===
>> I am using MSYS current (4.1.1).
>> So, as far I could tell, this means that we cannot use dlopen on MSYS to
>> dynamically open shared libraries by name like plugins do, am I right?
>> Libtool "knew" there was no dlfcn.h, but don't seems to absolutely need
>> it.
>> Maybe I would simply try with VC++ Express Edition;
>> Quite heavy for compiling Slate, or maybe I shoud switch to Cygwin.
>>
>> Any comment on this?
>>
> 




More information about the Slate mailing list