Logo Questions Linux Laravel Mysql Ubuntu Git Menu
 

mingw 3.4.5 missing dlfcn.h?

Tags:

mingw

is it possible that my mingw 3.4.5 installation is faulty? or is this provided on some other library floating around?

in case you are wondering, dlfcn.h is where stuff like dlopen and dlclose are defined, so it should be pretty standard

like image 610
lurscher Avatar asked Sep 09 '09 00:09

lurscher


4 Answers

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

like image 106
kotarou3 Avatar answered Oct 23 '22 02:10

kotarou3


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.).

like image 25
Michael Burr Avatar answered Oct 23 '22 01:10

Michael Burr


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.

like image 3
Andy Ross Avatar answered Oct 23 '22 01:10

Andy Ross


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.

like image 2
Maryam Saeidi Avatar answered Oct 23 '22 00:10

Maryam Saeidi