On 2015-03-18 10:04+0100 Laurent Berger wrote: > but how can I set COMPILE_DEFINITIONS? > At line 68-69 of CmakeLists.txt i can find > SET_SOURCE_FILES_PROPERTIES(${plplot_LIB_SRCS} > PROPERTIES COMPILE_FLAGS "-DUSINGDLL" ) > but (may be I'm wrong) it's only for plplot_LIB_SRCS and test_plbuf.c it's > not in the list.
Hi Laurant: Oops, you are right, and that might be the key for solving this issue. I was completely focussed on the shared library because it is important to export all symbols from there (which requires USINGDLL to be set for the library). Nothing special has to be done to import symbols into a C example for the gcc case with --visibility=hidden (All Unices, Cygwin, MinGW/MSYS, MinGW-w64/MSYS2) so I completely forgot about that issue for MSVC where apparently (from the CMake logic in include/pldll.h.in) something special does have to be done to import symbols, and that only happens if USINGDLL is set for all the C examples. That had already been done for examples/c/x??c, but not for several other C examples including test_plbuf. So I have now made sure that USINGDLL has been set for all examples in examples/c (commit id = ac66c44, the current master tip) so please give that a try and let us know if that completely solves the issues with shared libraries that you have been experiencing with MSVC and test_plbuf. @Phil, Arjen, and Jim: I have a feeling you guys have only been doing MSVC tests for the static library case because you saw some unresolved symbols for the shared library case. But please don't be so polite by keeping those build system issues to yourselves. :-) I really do want to know about and completely solve issues like that on Linux, and I hope to inspire you guys to have a similar "zero tolerance" attitude for build system issues on Windows. N.B. With luck commit id ac66c44 should be a complete cure for MSVC symbol visibility issues for the C examples case. However, I am sure there are also such issues for C++, Tcl, Tk, etc. examples so I will fix those after I get some sleep (unless you give me a nice surprise and beat me to that fix now I have shown what needs to be done for every add_executable command in examples/c++/CMakeLists.txt, etc.) 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); the Time Ephemerides project (timeephem.sf.net); PLplot scientific plotting software package (plplot.sf.net); 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 __________________________ ------------------------------------------------------------------------------ Dive into the World of Parallel Programming The Go Parallel Website, sponsored by Intel and developed in partnership with Slashdot Media, is your hub for all things parallel software development, from weekly thought leadership blogs to news, videos, case studies, tutorials and more. Take a look and join the conversation now. http://goparallel.sourceforge.net/ _______________________________________________ Plplot-devel mailing list Plplot-devel@lists.sourceforge.net https://lists.sourceforge.net/lists/listinfo/plplot-devel