Hi Alan, Arjen,

Alan wrote:
> 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.

Yes, this fixes the problem in this case (besides some macro
redefinition warnings).

(
Unfortunately, it makes another compile error in svg.c visible:

D:\project\PLPlot\drivers\svg.c(341) : error C2143: syntax error :
missing ';' before 'type'

I'll take a look at that.
)


> I think the key to this issue is this user specified the cmake option
> -DBUILD_SHARED_LIBS=OFF [...]

A build with BUILD_SHARED_LIBS=ON gets problems at the same location (in
unmodified rev8861):

cl   -Dplplotd_EXPORTS  /DWIN32 /D_WINDOWS /W3 /Zm1000 /D_DEBUG /MDd /Zi
 /Ob0 /Od /RTC1 -ID:\project\PLPlot\include
-ID:\project\PLPlot\build-vc9-shared-Debug
-ID:\project\PLPlot\build-vc9-shared-Debug\include -DHAVE_CONFIG_H
-D_CRT_SECURE_NO_DEPRECATE /FoCMakeFiles\plplotd.dir\__\drivers\hpgl.obj
/FdD:\project\PLPlot
\build-vc9-shared-Debug\dll\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'


Adding the snippet

#define STRINGIZE2(x) #x
#define STRINGIZE(x) STRINGIZE2(x)
#pragma message ("PLDLLEXPORT" STRINGIZE(: PLDLLEXPORT))
#pragma message ("PLDLLIMPEXP" STRINGIZE(: PLDLLIMPEXP))

to hpgl.c (in otherwise unmodified rev8861) shows that for
BUILD_SHARED_LIBS=ON PLDLLEXPORT expands to __declspec(dllexport), but
PLDLLIMPEXP stays empty.

Further investigation shows that MAKINGPLDLL is not defined when
compiling hpgl.c.

-- Robert

-------------------------------------------------------------------------
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

Reply via email to