mingw 3.4.5 missing dlfcn.h?

It's not in my MinGW 3.4.5 installation, so I doubt your installation is faulty. I suppose the the MinGW maintainers expect you to use the Win32 functions supporting dynamic loading (LoadLibrary(), GetProcAddress(), etc.).


mingw is an implenentation of a compiler for windows (a gcc port) implementing the win32 API. The functions in dlfcn.h (dlopen/dlsym et. al.) are POSIX, not windows, so no win32 implementation exists. There may be a wrapper in msys or cygwin, but I fear that the differences between the windows DLL and the ELF shared library mechanisms means you'll simply need to port to the windows APIs.


dlfcn-win32 is a wrapper for dlfcn around the win32 dll functions


I had this problem, and after installing dlfcn-win32-r19.tar.bz2 on windows under cygwin shell, the problem was solved.

https://code.google.com/p/dlfcn-win32/downloads/detail?name=dlfcn-win32-r19.tar.bz2

I hope this help other guys.

Tags:

Mingw