Hi all, > Now to bring up a different, but related topic. Werner, do you know the > Windows library call (or calls) to dynamically load plug-ins? If so, I > think basically all you have to do to implement dynamic drivers on Windows > is replace the libltdl calls (lt_dlinit, lt_dlopenext, lt_dlsym, and > lt_dlexit) in src/plcore.c and drivers/get-drv-info.c by the equivalent > Windows library functions for the #if defined(WIN32) case. So long as you > know how to dynamically load on Windows, I don't think this will be a > particularly time-consuming project, and it really is time for the Windows > version of PLplot to get access to this nice feature that all the Unix > developers and users enjoy.
it's now possible to load shared driver modules during run time on win32 platforms. What I did basically was to implement the ltdl API (parts of it) for Win32 in ltdl_win32.c/.h. I didn't look at the source of the ltdl library nor did I copy something from there, so I put this code under LGPL - no matter what license ltdl library has. I changed the CBS accordingly - since Cygwin and MSys provide very likely the ltdl library I excluded these toolkits from these changes. I had to define LTDL_WIN32 to keep it simple - this macro will also be defined in config.h. Together with some other minor changes this made the shared drivers work for MinGW. Visual C++ misses the dirent.h implementation so I downloaded a free one from here: http://www.softagalleria.net/dirent.php and included it in the svn repository. This implementation will only be used for Visual C++ compilers for now. Now it works for Visual C++ as well, except for a little crash :) at the exit of the examples. Very likely my ltdl implementation has some bugs, so this needs to be examined. Mind though, that from now on this is the default case on Windows, since ENABLE_DYN_DRIVERS is set by default (and won't be turned off if ltdl is not found, since we don't look for ltdl on win32). In order to get everything compiled you must put the ${CMAKE_BINARY_PATH}\dll directory in your PATH environment variable. Otherwise get-drv-info won't run and stops the compilation. Examples were run in the build tree. I'm not sure if this still works if the we run examples not from within the build tree since plplot won't find the *.rc files. This needs also to be investigated. I urge everybody to run tests even on non-win32 and win32 platforms, since I didn't test on Linux or Mac OS X if I broke something. Maybe I also forgot to commit something. Regards, Werner -- Dr. Werner Smekal Institut fuer Allgemeine Physik Technische Universitaet Wien Wiedner Hauptstr 8-10 A-1040 Wien Austria email: [EMAIL PROTECTED] web: http://www.iap.tuwien.ac.at/~smekal phone: +43-(0)1-58801-13463 (office) +43-(0)1-58801-13469 (laboratory) fax: +43-(0)1-58801-13499 ------------------------------------------------------------------------- This SF.Net email is sponsored by the Moblin Your Move Developer's challenge Build the coolest Linux based applications with Moblin SDK & win great prizes Grand prize is a trip for two to an Open Source event anywhere in the world http://moblin-contest.org/redirect.php?banner_id=100&url=/ _______________________________________________ Plplot-devel mailing list Plplot-devel@lists.sourceforge.net https://lists.sourceforge.net/lists/listinfo/plplot-devel