Hi Andrew,
> This may not be quite the right long term solution. Language bindings > for example might be importing some symbols from the core library and > exporting others to the user. Similarly for drivers. Sure. Ok, I rephrase: this is the correct solution as it was initially considered, but since plplot is a little more complicated, we need to adjust that (in the long term). > > I'm not quite sure why things work at the moment. I suspect it is > because the import is optional. We should probably try to fix this > though to make it really clear whether we are importing or exporting. > > I did this for the drivers - they use PLDLLEXPORT in the source because > they only every export symbols to the core library. The imports are > defined elsewhere. This is something, what should be decided by the cmake and not by the source/headers files. So if xxxMAKINGDLL is defined, xxxIMPEXP is defined to export symbols, if USINGDLL is defined, xxxIMPEXP is defined to import symbols. For the core library its easy, we always export (still we should use DLLIMPEXP). For the examples it's also easy we always import. For the bindings, it's more complicated since we export symbols, but also import symbols from the core. Drivers are also a different story. I suggest that we use the macro cmake defines at compile time for shared libraries. if you run "make VERBOSE=1" for the shared libraries you will see that a macro like "-Dplplotd_EXPORT" is defined. So we always know, what is built in the moment, and set DLLEXPIMP to export. I hope that this will also be set for the drivers. We then don't have to worry about defining MAKINGDLL at the correct time. This is something we have to investigate further. 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