Hi Robert: Thanks for your report for revision 8861, the latest svn trunk version of PLplot.
Arjen, I have a question for you below. On 2008-10-07 17:40+0200 Robert Pollak wrote: [...] > cmake -G "NMake Makefiles" ^ > -DCMAKE_BUILD_TYPE=%BUILD_TYPE% ^ > -DCMAKE_INSTALL_PREFIX=install ^ > -DBUILD_SHARED_LIBS=OFF ^ > -DCMAKE_VERBOSE_MAKEFILE=ON ^ > -DBUILD_TEST=ON ^ .. [...] > This runs up to the following compile error: > cl /DWIN32 /D_WINDOWS /W3 /Zm1000 /D_DEBUG /MDd /Zi /Ob0 /Od /RTC1 > -ID:\project\PLPlot\include -ID:\project\PLPlot\build-vc9-static-Debug > -ID:\project\PLPlot\build-vc9-static-Debug\include -DHAVE_CONFIG_H > -D_CRT_SECURE_NO_DEPRECATE /FoCMakeFiles\plplotd.dir\__\drivers\hpgl.obj > /FdD:\project\PLPlot\build-vc9-static-Debug\src\plplotd.pdb -c > D:\project\PLPlot\drivers\hpgl.c > > [...]hpgl.c > D:\project\PLPlot\drivers\hpgl.c(141) : error C2375: > 'plD_dispatch_init_hp7470': redefinition; different linkage > D:\project\PLPlot\include\drivers.h(73) : see declaration of > 'plD_dispatch_init_hp7470' > > > When I switch off one affected driver after the other (as with > -DPLD_hp7470=OFF), I see the error appearing in a lot of drivers. Arjen, you are the PLplot expert in this area so this question is directed to you: The two lines in question are drivers/hpgl.c, line 140 PLDLLEXPORT void plD_dispatch_init_hp7470( PLDispatchTable *pdt ) and include/drivers.h, line 73 PLDLLIMPEXP void plD_dispatch_init_hp7470 ( PLDispatchTable *pdt ); So I believe this user found a combination of flags that set PLDLLIMPEXP different from PLDLLEXPORT. The relevant logic is in include/pldll.h #if defined(MAKINGPLDLL) #define PLDLLIMPEXP PLDLLEXPORT #define PLDLLIMPEXP_DATA(type) PLDLLEXPORT type #elif defined(USINGPLDLL) #define PLDLLIMPEXP PLDLLIMPORT #define PLDLLIMPEXP_DATA(type) PLDLLIMPORT type #else #define PLDLLIMPEXP #define PLDLLIMPEXP_DATA(type) type #endif I think the key to this issue is this user specified the cmake option -DBUILD_SHARED_LIBS=OFF which means MAKINGPLDLL is not defined, in which case PLDLLIMPEXP is defined to nothing, but PLDLLEXPORT is still defined to something (by the Windows stanzas earlier in include/pldll.h). Robert, what happens if you add #define PLDLLEXPORT #define PLDLLIMPORT to the #else stanza above? I predict that will fix your problem with the -DBUILD_SHARED_LIBS=OFF case. Arjen, if you agree that is no-brainer fix, please make the commit. (I feel intimidated from doing that myself because I have no access to windows boxes to even make a superficial test of the change.) 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 __________________________ ------------------------------------------------------------------------- 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