Warning: include() [function.include]: URL file-access is disabled in the server configuration in /home/.showoff/linuxfaqs/linux-faqs.com/HOWTO/C++-dlopen/faq.php on line 34

Warning: include(http://www.linux-faqs.com/HOWTO/header.inc) [function.include]: failed to open stream: no suitable wrapper could be found in /home/.showoff/linuxfaqs/linux-faqs.com/HOWTO/C++-dlopen/faq.php on line 34

Warning: include() [function.include]: Failed opening 'http://www.linux-faqs.com/HOWTO/header.inc' for inclusion (include_path='.:/usr/local/php5/lib/php:/usr/local/lib/php') in /home/.showoff/linuxfaqs/linux-faqs.com/HOWTO/C++-dlopen/faq.php on line 34

Warning: include() [function.include]: URL file-access is disabled in the server configuration in /home/.showoff/linuxfaqs/linux-faqs.com/HOWTO/C++-dlopen/faq.php on line 35

Warning: include(http://www.linux-faqs.com/HOWTO/header.bottom.inc) [function.include]: failed to open stream: no suitable wrapper could be found in /home/.showoff/linuxfaqs/linux-faqs.com/HOWTO/C++-dlopen/faq.php on line 35

Warning: include() [function.include]: Failed opening 'http://www.linux-faqs.com/HOWTO/header.bottom.inc' for inclusion (include_path='.:/usr/local/php5/lib/php:/usr/local/lib/php') in /home/.showoff/linuxfaqs/linux-faqs.com/HOWTO/C++-dlopen/faq.php on line 35
 
Warning: include(body.left.inc) [function.include]: failed to open stream: No such file or directory in /home/.showoff/linuxfaqs/linux-faqs.com/HOWTO/C++-dlopen/faq.php on line 39

Warning: include() [function.include]: Failed opening 'body.left.inc' for inclusion (include_path='.:/usr/local/php5/lib/php:/usr/local/lib/php') in /home/.showoff/linuxfaqs/linux-faqs.com/HOWTO/C++-dlopen/faq.php on line 39


 

4. Frequently Asked Questions

4.1. I'm using Windows and I can't find the dlfcn.h header file on my PC! What's the problem?
4.2. Is there some kind of dlopen -compatible wrapper for the Windows LoadLibrary API?

4.1. I'm using Windows and I can't find the dlfcn.h header file on my PC! What's the problem?

The problem is, as usual, Windows. There is no dlfcn.h header on Windows,and there is no dlopen API. There is a similar API around the LoadLibrary function, and most of what is written here applies to it, too. Alternatively, you can use libltdl (included in libtool) to "emulate" dlopen on a variety of platforms.

You should also read section 4, "Dynamically Loaded (DL) Libraries" , of the Program Library HOWTO for more techniques to load libraries and create classes independently of your platform.

4.2. Is there some kind of dlopen -compatible wrapper for the Windows LoadLibrary API?

I don't know of any, and I don't think there'll ever be one supporting all of dlopen 's options.

There are alternatives though: libtltdl (a part of libtool), which wraps a variety of different dynamic loading APIs, among others dlopen and LoadLibrary . Another one is the Dynamic Module Loading functionality of GLib . You can use one of these to ensure better possible cross-platform compatibility. I've never used any of them, so I can't tell you how stable they are and whether they really work.


 
Warning: include() [function.include]: URL file-access is disabled in the server configuration in /home/.showoff/linuxfaqs/linux-faqs.com/HOWTO/C++-dlopen/faq.php on line 282

Warning: include(http://www.linux-faqs.com/HOWTO/body.right.inc) [function.include]: failed to open stream: no suitable wrapper could be found in /home/.showoff/linuxfaqs/linux-faqs.com/HOWTO/C++-dlopen/faq.php on line 282

Warning: include() [function.include]: Failed opening 'http://www.linux-faqs.com/HOWTO/body.right.inc' for inclusion (include_path='.:/usr/local/php5/lib/php:/usr/local/lib/php') in /home/.showoff/linuxfaqs/linux-faqs.com/HOWTO/C++-dlopen/faq.php on line 282


 

Warning: include() [function.include]: URL file-access is disabled in the server configuration in /home/.showoff/linuxfaqs/linux-faqs.com/HOWTO/C++-dlopen/faq.php on line 287

Warning: include(http://www.linux-faqs.com/HOWTO/footer.inc) [function.include]: failed to open stream: no suitable wrapper could be found in /home/.showoff/linuxfaqs/linux-faqs.com/HOWTO/C++-dlopen/faq.php on line 287

Warning: include() [function.include]: Failed opening 'http://www.linux-faqs.com/HOWTO/footer.inc' for inclusion (include_path='.:/usr/local/php5/lib/php:/usr/local/lib/php') in /home/.showoff/linuxfaqs/linux-faqs.com/HOWTO/C++-dlopen/faq.php on line 287