Hi, Alan W. Irwin wrote: > On 2008-09-10 18:08+0100 Andrew Ross wrote: > >> On Wed, Sep 10, 2008 at 09:22:48AM -0700, Alan Irwin wrote: >>> [...]Also, notice that libplplotd uses >>> some DLL symbols and also makes others. That is handled by PROPERTIES >>> COMPILE_FLAGS "-DMAKINGPLDLL -DUSINGCSADLL -DUSINGNNDLL". Similarly, >>> shouldn't libplplotcxxd be using C symbols from libplplotd and also >>> making >>> C++ symbols available? There is no difference between what attributes >>> are >>> assigned for GCC for the import and export cases, but that is not >>> true of >>> proprietary Windows compilers so I would think you would have to >>> continue >>> the distinction between USING<LIBNAME>DLL and MAKING<LIBNAME>DLL that >>> you >>> started with libplplotd in order for your logic to work correctly for >>> libplplotcxxd visibility. >>> >> >> Alan, >> >> The plstream class is marked as PLDLLIMPEXP and this will be passed on >> to all member functions, so there is only need for the one definition. >> See the gcc visibility wiki for a brief explanation (at the bottom). You >> need to know a little about C++ terminology to decipher it. > > Hi Andrew: > > I still have a difficult time wrapping my head around OO terminology so > thanks for that explanation. So in sum it appears from your explanation > that all should be well for C++ visibility for Linux, and you have verified > that by using g++ -fvisibility=hidden on at least one of your Linux > platforms. > > I am still concerned about the above distinction between USING<LIBNAME>DLL > and MAKING<LIBNAME>DLL that affects only the Windows case. "-DMAKINGPLDLL" > is used as a property for the libplplotcxxd source code so the C++ symbols > should be exported from libplplotcxx okay on Windows. But doesn't > libplotcxxd need to import symbols from libplplotd on windows similar to > the > way that libplplotd imports symbols from libcsirocsa and libcsironn? > > I assume Werner or Arjen are in the best position to give me an > answer to that question so it is mostly directed to them.
I think that you are actually right. We would need MAKINGPLCXXDLL (for the source) and USINGPLCXXDLL (for the examples) definitions. And since the cpp library uses c functions from liplplotd USINGPLDLL must be defined. I wonder, why it worked so far for Windows. One different thing: while I added the USINGDLL/MAKINGDLL stuff I wasn't aware that CMake actually defines a macro which is called EXPORT_something during the compilation phase. This would make things maybe a little easier, since Cmake would take care what macro is defined. Regards, Werner > > Alan > __________________________ > Alan W. Irwin > > Astronomical research affiliation with Department of Physics and Astronomy, > University of Victoria (astrowww.phys.uvic.ca). > > Programming affiliations with the FreeEOS equation-of-state implementation > for stellar interiors (freeeos.sf.net); PLplot scientific plotting software > package (plplot.org); the libLASi project (unifont.org/lasi); the Loads of > Linux Links project (loll.sf.net); and the Linux Brochure Project > (lbproject.sf.net). > __________________________ > > Linux-powered Science > __________________________ -- 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