Re: [Plplot-devel] Cannot compile plplot using VS 2017

2018-09-23 Thread Phil Rosenberg
Good news! Thanks for reporting the problem.

Phil

Get Outlook for Android<https://aka.ms/ghei36>


From: Laurent Berger 
Sent: Sunday, September 23, 2018 11:12:50 AM
To: Alan W. Irwin; Phil Rosenberg
Cc: PLplot development list
Subject: Re: [Plplot-devel] Cannot compile plplot using VS 2017

Hi,

https://sourceforge.net/p/plplot/plplot/ci/4a5f94a70ac259d696dfaa8117cead7ad89b13f3/
: It works thanks!


New file is now

// Headers needed for Rand
#ifdef _WIN32
// This include must occur before any other include of stdlib.h due to
// the #define _CRT_RAND_S
#define _CRT_RAND_S
#include 
#else
#include 
#endif

// wxwidgets headers
#include 
#include 
#include 
// PLplot headers
#include "plDevs.h"
#include "wxwidgets.h" // includes wx/wx.h


// std and driver headers
#include 
#include 


Le 23/09/2018 à 02:23, Alan W. Irwin a écrit :
> On 2018-09-22 23:16+0100 Phil Rosenberg wrote:
>
>> Hi Laurent
>>
>> I have implemented your first solution. If you could let me know that
>> things now work for you that would be great.
>
> Hi Phil:
>
> Although your question was addressed to Laurent, it should interest
> you to know your fix causes no issues for Linux (i.e., building the
> test_c_wxwidgets and test_wxPLplotDemo targets caused no obvious build
> or run-time issues).
>
> Alan
> __
> Alan W. Irwin
>
> 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
> __

___
Plplot-devel mailing list
Plplot-devel@lists.sourceforge.net
https://lists.sourceforge.net/lists/listinfo/plplot-devel


Re: [Plplot-devel] Cannot compile plplot using VS 2017

2018-09-23 Thread Laurent Berger

Hi,

https://sourceforge.net/p/plplot/plplot/ci/4a5f94a70ac259d696dfaa8117cead7ad89b13f3/ 
: It works thanks!



New file is now

// Headers needed for Rand
#ifdef _WIN32
// This include must occur before any other include of stdlib.h due to
// the #define _CRT_RAND_S
#define _CRT_RAND_S
#include 
#else
#include 
#endif

// wxwidgets headers
#include 
#include 
#include 
// PLplot headers
#include "plDevs.h"
#include "wxwidgets.h" // includes wx/wx.h


// std and driver headers
#include 
#include 


Le 23/09/2018 à 02:23, Alan W. Irwin a écrit :

On 2018-09-22 23:16+0100 Phil Rosenberg wrote:


Hi Laurent

I have implemented your first solution. If you could let me know that
things now work for you that would be great.


Hi Phil:

Although your question was addressed to Laurent, it should interest
you to know your fix causes no issues for Linux (i.e., building the
test_c_wxwidgets and test_wxPLplotDemo targets caused no obvious build
or run-time issues).

Alan
__
Alan W. Irwin

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
__




___
Plplot-devel mailing list
Plplot-devel@lists.sourceforge.net
https://lists.sourceforge.net/lists/listinfo/plplot-devel


Re: [Plplot-devel] Cannot compile plplot using VS 2017

2018-09-23 Thread Phil Rosenberg
Excellent, thanks Alan
On Sun, 23 Sep 2018 at 01:25, Alan W. Irwin  wrote:
>
> On 2018-09-22 23:16+0100 Phil Rosenberg wrote:
>
> > Hi Laurent
> >
> > I have implemented your first solution. If you could let me know that
> > things now work for you that would be great.
>
> Hi Phil:
>
> Although your question was addressed to Laurent, it should interest
> you to know your fix causes no issues for Linux (i.e., building the
> test_c_wxwidgets and test_wxPLplotDemo targets caused no obvious build
> or run-time issues).
>
> Alan
> __
> Alan W. Irwin
>
> 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
> __


___
Plplot-devel mailing list
Plplot-devel@lists.sourceforge.net
https://lists.sourceforge.net/lists/listinfo/plplot-devel


Re: [Plplot-devel] Cannot compile plplot using VS 2017

2018-09-22 Thread Alan W. Irwin

On 2018-09-22 23:16+0100 Phil Rosenberg wrote:


Hi Laurent

I have implemented your first solution. If you could let me know that
things now work for you that would be great.


Hi Phil:

Although your question was addressed to Laurent, it should interest
you to know your fix causes no issues for Linux (i.e., building the
test_c_wxwidgets and test_wxPLplotDemo targets caused no obvious build
or run-time issues).

Alan
__
Alan W. Irwin

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
__


___
Plplot-devel mailing list
Plplot-devel@lists.sourceforge.net
https://lists.sourceforge.net/lists/listinfo/plplot-devel


Re: [Plplot-devel] Cannot compile plplot using VS 2017

2018-09-22 Thread Phil Rosenberg
Hi Laurent

I have implemented your first solution. If you could let me know that
things now work for you that would be great.

Thanks

Phil
On Sat, 22 Sep 2018 at 11:44, Laurent Berger
 wrote:
>
> I tried  2 solutions :
>
> FIRST solution
>
> don't change wxwidgets_dev.cpp
>
> and change include order in wxwidgets.h #include  after
>  and before  // plplot headers
>
> then  $ git diff is
> diff --git a/drivers/wxwidgets.h b/drivers/wxwidgets.h
> index 884292d07..0818f357c 100644
> --- a/drivers/wxwidgets.h
> +++ b/drivers/wxwidgets.h
> @@ -22,13 +22,14 @@
>
>   #include 
>   #include 
> +#include 
>
>   // plplot headers
>   #include "plplotP.h"
>   #include "wxwidgets_comms.h"
>
>   // some special wxWidgets headers
> -#include 
> +//#include 
>   #include 
>   #include 
>
> SECOND solution
>
> add #include  in wxwidgets_dev.cpp at line 41
>
> then $git diff is
> diff --git a/drivers/wxwidgets_dev.cpp b/drivers/wxwidgets_dev.cpp
> index 6351c6893..07089d83a 100644
> --- a/drivers/wxwidgets_dev.cpp
> +++ b/drivers/wxwidgets_dev.cpp
> @@ -38,7 +38,7 @@
>   #else
>   #include 
>   #endif
> -
> +#include 
>   // PLplot headers
>   #include "plDevs.h"
>   #include "wxwidgets.h" // includes wx/wx.h
>
>
>
> Le 22/09/2018 à 12:26, Phil Rosenberg a écrit :
> > Hi Laurent
> >
> > Okay, well if your solution works, the I think we should add it in.
> >
> > Could I please ask for you to check what the minimum list of headers
> > to be included needs to be? Would just adding wx/wx.h be sufficient or
> > do all those headers need to be added?
> >
> > Phil
> >
> > Phil
> > On Sat, 22 Sep 2018 at 10:24, Laurent Berger
> >  wrote:
> >> Hi Phil, Alan,
> >>
> >> I check everything this morning (local time) and I have got same errors.
> >>
> >> I attached my cmakecache for plplot and cmakecache for wxwidgets
> >>
> >> git diff
> >>
> >> Laurent@PC-Laurent-Vision MINGW64 /g/lib/plplot (master)
> >> $ git diff
> >> diff --git a/drivers/wxwidgets_dev.cpp b/drivers/wxwidgets_dev.cpp
> >> index 6351c6893..27b20750e 100644
> >> --- a/drivers/wxwidgets_dev.cpp
> >> +++ b/drivers/wxwidgets_dev.cpp
> >> @@ -38,7 +38,15 @@
> >>#else
> >>#include 
> >>#endif
> >> +#include 
> >> +#include 
> >> +#include 
> >>
> >> +#include "plDevs.h"
> >> +
> >> +// plplot headers
> >> +#include "plplotP.h"
> >> +#include "drivers.h"
> >>// PLplot headers
> >>#include "plDevs.h"
> >>#include "wxwidgets.h" // includes wx/wx.h
> >>
> >>
> >>
> >>
> >> Le 22/09/2018 à 01:37, Phil Rosenberg a écrit :
> >>> Hi Laurent
> >>> What a strange set of compilation errors. They are all from windows
> >>> sockets headers, rather than from wxWidgets.
> >>>
> >>> Here is my guess at what is happening - but I have not been able to
> >>> reproduce the error (I am using VS 2015 still).
> >>>
> >>> In the code before your edits following the #includes through, it
> >>> turns out we include  into wxwidgets_dev.cpp before any
> >>> wxWidgets headers. This is done via "wxwidgets.h", then
> >>> "wxwidgets_comms.h". The winsock related functions probably get pulled
> >>> in via windows.h. I have a feeling that one of the wx headers is then
> >>> pulling in alternate definitions of those winsock functions, but I'm
> >>> not sure from where.
> >>>
> >>> By shuffling the headers round as you have, you include 
> >>> before we pull in . The  file will in turn pull in
> >>>  itself. then our include windows.h should get ignored.
> >>>
> >>> I can't think how exectly it might work, but I bet there is some weird
> >>> inconsistency between how  is pulled in by us, vs how it is
> >>> pulled in by wxWidgets - maybe related to some #defines like DLLEXPORT
> >>> or extern "C".
> >>>
> >>> Anyway I might guess that moving the headers around is simply masking
> >>> some other problem. Can I check that you have built wxWidgets with the
> >>> same virsion of visual studio? And that it is also built as a static
> >>> lib? Just a hunch but maybe something to do with the wxwidgets library
> >>> configuration is causing the issue.
> >>>
> >>> Phil
> >>> On Fri, 21 Sep 2018 at 23:08, Alan W. Irwin  
> >>> wrote:
>  On 2018-09-21 18:38+0200 Laurent Berger wrote:
> 
> > Hi,
> >
> > I have just done a git clone : (Date:   Thu Sep 20 22:36:48 2018 -0700
> > ) commit caf4801dfef32207b74f5374eff52bf2a4c24e3d
> >
> > and delete cmakecache.txt and I I'm trying to build plplot in static
> >
> > BUILD_SHARED_LIBS:BOOL=OFF
> >
> > and ENABLE_DYNDRIVERS:BOOL=OFF
> >
> > and I have got 59 errors compiling wxwidgets_dev.cpp.
> >
> > In git repo I can find this file
> > https://github.com/PLplot/PLplot/blob/14ecc4bd943caa40a830e0da066ff7a220b9d5e8/drivers/wxwidgets.cpp
> >
> > I copy
> > https://github.com/PLplot/PLplot/blob/14ecc4bd943caa40a830e0da066ff7a220b9d5e8/drivers/wxwidgets.cpp#L28-L36
> > and insert those lines here
> > 

Re: [Plplot-devel] Cannot compile plplot using VS 2017

2018-09-22 Thread Phil Rosenberg
Hi Laurent

Okay, well if your solution works, the I think we should add it in.

Could I please ask for you to check what the minimum list of headers
to be included needs to be? Would just adding wx/wx.h be sufficient or
do all those headers need to be added?

Phil

Phil
On Sat, 22 Sep 2018 at 10:24, Laurent Berger
 wrote:
>
> Hi Phil, Alan,
>
> I check everything this morning (local time) and I have got same errors.
>
> I attached my cmakecache for plplot and cmakecache for wxwidgets
>
> git diff
>
> Laurent@PC-Laurent-Vision MINGW64 /g/lib/plplot (master)
> $ git diff
> diff --git a/drivers/wxwidgets_dev.cpp b/drivers/wxwidgets_dev.cpp
> index 6351c6893..27b20750e 100644
> --- a/drivers/wxwidgets_dev.cpp
> +++ b/drivers/wxwidgets_dev.cpp
> @@ -38,7 +38,15 @@
>   #else
>   #include 
>   #endif
> +#include 
> +#include 
> +#include 
>
> +#include "plDevs.h"
> +
> +// plplot headers
> +#include "plplotP.h"
> +#include "drivers.h"
>   // PLplot headers
>   #include "plDevs.h"
>   #include "wxwidgets.h" // includes wx/wx.h
>
>
>
>
> Le 22/09/2018 à 01:37, Phil Rosenberg a écrit :
> > Hi Laurent
> > What a strange set of compilation errors. They are all from windows
> > sockets headers, rather than from wxWidgets.
> >
> > Here is my guess at what is happening - but I have not been able to
> > reproduce the error (I am using VS 2015 still).
> >
> > In the code before your edits following the #includes through, it
> > turns out we include  into wxwidgets_dev.cpp before any
> > wxWidgets headers. This is done via "wxwidgets.h", then
> > "wxwidgets_comms.h". The winsock related functions probably get pulled
> > in via windows.h. I have a feeling that one of the wx headers is then
> > pulling in alternate definitions of those winsock functions, but I'm
> > not sure from where.
> >
> > By shuffling the headers round as you have, you include 
> > before we pull in . The  file will in turn pull in
> >  itself. then our include windows.h should get ignored.
> >
> > I can't think how exectly it might work, but I bet there is some weird
> > inconsistency between how  is pulled in by us, vs how it is
> > pulled in by wxWidgets - maybe related to some #defines like DLLEXPORT
> > or extern "C".
> >
> > Anyway I might guess that moving the headers around is simply masking
> > some other problem. Can I check that you have built wxWidgets with the
> > same virsion of visual studio? And that it is also built as a static
> > lib? Just a hunch but maybe something to do with the wxwidgets library
> > configuration is causing the issue.
> >
> > Phil
> > On Fri, 21 Sep 2018 at 23:08, Alan W. Irwin  
> > wrote:
> >> On 2018-09-21 18:38+0200 Laurent Berger wrote:
> >>
> >>> Hi,
> >>>
> >>> I have just done a git clone : (Date:   Thu Sep 20 22:36:48 2018 -0700
> >>> ) commit caf4801dfef32207b74f5374eff52bf2a4c24e3d
> >>>
> >>> and delete cmakecache.txt and I I'm trying to build plplot in static
> >>>
> >>> BUILD_SHARED_LIBS:BOOL=OFF
> >>>
> >>> and ENABLE_DYNDRIVERS:BOOL=OFF
> >>>
> >>> and I have got 59 errors compiling wxwidgets_dev.cpp.
> >>>
> >>> In git repo I can find this file
> >>> https://github.com/PLplot/PLplot/blob/14ecc4bd943caa40a830e0da066ff7a220b9d5e8/drivers/wxwidgets.cpp
> >>>
> >>> I copy
> >>> https://github.com/PLplot/PLplot/blob/14ecc4bd943caa40a830e0da066ff7a220b9d5e8/drivers/wxwidgets.cpp#L28-L36
> >>> and insert those lines here
> >>> https://github.com/PLplot/PLplot/blob/master/drivers/wxwidgets_dev.cpp#L41
> >>>
> >>> I can compile and link plplot.
> >> Hi Laurent:
> >>
> >> Thanks for your test of my recent PLplot development activity.
> >>
> >> I have looked at commits 14ecc4bd94 (= plplot-5.13.0-59-g14ecc4bd9)
> >> and caf4801dfe (current master tip), and your description of the
> >> required change appears to correspond to copying some wxwidgets includes 
> >> from
> >> one part of the old commit (or alternatively the latest commit since
> >> those lines haven't changed) to just after
> >>
> >> #include "wxwidgets.h"
> >>
> >> As far as I can tell such a copy of includes should have zero effect
> >> so it appears either I misunderstood the change you described above or
> >> else the github repo for PLplot is not properly up to date with the
> >> definitive SourceForge repo.  So to remove this uncertainty please
> >> give us the results of
> >>
> >> git diff
> >>
> >> to describe the definitive version of the change to the master tip of
> >> PLplot that works for you (i.e., allows a static build of PLplot to
> >> compile and link for your VS2017 platform).
> >>
> >> By the way, a comprehensive test of PLplot has recently (one commit
> >> behind master tip) worked perfectly here on Linux (Debian Buster).
> >> Such comprehensive tests include not only building a static wxwidgets
> >> device but run-time testing it as well.  Also that last commit on the
> >> master branch is a minor one involving how to control the Lua version
> >> that is searched for and is therefore extremely unlikely to introduce
> >> 

Re: [Plplot-devel] Cannot compile plplot using VS 2017

2018-09-21 Thread Phil Rosenberg
Hi Laurent
What a strange set of compilation errors. They are all from windows
sockets headers, rather than from wxWidgets.

Here is my guess at what is happening - but I have not been able to
reproduce the error (I am using VS 2015 still).

In the code before your edits following the #includes through, it
turns out we include  into wxwidgets_dev.cpp before any
wxWidgets headers. This is done via "wxwidgets.h", then
"wxwidgets_comms.h". The winsock related functions probably get pulled
in via windows.h. I have a feeling that one of the wx headers is then
pulling in alternate definitions of those winsock functions, but I'm
not sure from where.

By shuffling the headers round as you have, you include 
before we pull in . The  file will in turn pull in
 itself. then our include windows.h should get ignored.

I can't think how exectly it might work, but I bet there is some weird
inconsistency between how  is pulled in by us, vs how it is
pulled in by wxWidgets - maybe related to some #defines like DLLEXPORT
or extern "C".

Anyway I might guess that moving the headers around is simply masking
some other problem. Can I check that you have built wxWidgets with the
same virsion of visual studio? And that it is also built as a static
lib? Just a hunch but maybe something to do with the wxwidgets library
configuration is causing the issue.

Phil
On Fri, 21 Sep 2018 at 23:08, Alan W. Irwin  wrote:
>
> On 2018-09-21 18:38+0200 Laurent Berger wrote:
>
> > Hi,
> >
> > I have just done a git clone : (Date:   Thu Sep 20 22:36:48 2018 -0700
> > ) commit caf4801dfef32207b74f5374eff52bf2a4c24e3d
> >
> > and delete cmakecache.txt and I I'm trying to build plplot in static
> >
> > BUILD_SHARED_LIBS:BOOL=OFF
> >
> > and ENABLE_DYNDRIVERS:BOOL=OFF
> >
> > and I have got 59 errors compiling wxwidgets_dev.cpp.
> >
> > In git repo I can find this file
> > https://github.com/PLplot/PLplot/blob/14ecc4bd943caa40a830e0da066ff7a220b9d5e8/drivers/wxwidgets.cpp
> >
> > I copy
> > https://github.com/PLplot/PLplot/blob/14ecc4bd943caa40a830e0da066ff7a220b9d5e8/drivers/wxwidgets.cpp#L28-L36
> > and insert those lines here
> > https://github.com/PLplot/PLplot/blob/master/drivers/wxwidgets_dev.cpp#L41
> >
> > I can compile and link plplot.
>
> Hi Laurent:
>
> Thanks for your test of my recent PLplot development activity.
>
> I have looked at commits 14ecc4bd94 (= plplot-5.13.0-59-g14ecc4bd9)
> and caf4801dfe (current master tip), and your description of the
> required change appears to correspond to copying some wxwidgets includes from
> one part of the old commit (or alternatively the latest commit since
> those lines haven't changed) to just after
>
> #include "wxwidgets.h"
>
> As far as I can tell such a copy of includes should have zero effect
> so it appears either I misunderstood the change you described above or
> else the github repo for PLplot is not properly up to date with the
> definitive SourceForge repo.  So to remove this uncertainty please
> give us the results of
>
> git diff
>
> to describe the definitive version of the change to the master tip of
> PLplot that works for you (i.e., allows a static build of PLplot to
> compile and link for your VS2017 platform).
>
> By the way, a comprehensive test of PLplot has recently (one commit
> behind master tip) worked perfectly here on Linux (Debian Buster).
> Such comprehensive tests include not only building a static wxwidgets
> device but run-time testing it as well.  Also that last commit on the
> master branch is a minor one involving how to control the Lua version
> that is searched for and is therefore extremely unlikely to introduce
> wxwidgets issues.  Therefore, I cannot replicate your issue on Linux
> so someone with access to recent Windows platforms will have to
> attempt that instead.
>
> Alan
> __
> Alan W. Irwin
>
> 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
> __
>
>
> ___
> Plplot-devel mailing list
> Plplot-devel@lists.sourceforge.net
> https://lists.sourceforge.net/lists/listinfo/plplot-devel


___
Plplot-devel mailing list
Plplot-devel@lists.sourceforge.net
https://lists.sourceforge.net/lists/listinfo/plplot-devel


Re: [Plplot-devel] Cannot compile plplot using VS 2017

2018-09-21 Thread Alan W. Irwin

On 2018-09-21 18:38+0200 Laurent Berger wrote:


Hi,

I have just done a git clone : (Date:   Thu Sep 20 22:36:48 2018 -0700
) commit caf4801dfef32207b74f5374eff52bf2a4c24e3d

and delete cmakecache.txt and I I'm trying to build plplot in static

BUILD_SHARED_LIBS:BOOL=OFF

and ENABLE_DYNDRIVERS:BOOL=OFF

and I have got 59 errors compiling wxwidgets_dev.cpp.

In git repo I can find this file 
https://github.com/PLplot/PLplot/blob/14ecc4bd943caa40a830e0da066ff7a220b9d5e8/drivers/wxwidgets.cpp


I copy 
https://github.com/PLplot/PLplot/blob/14ecc4bd943caa40a830e0da066ff7a220b9d5e8/drivers/wxwidgets.cpp#L28-L36 
and insert those lines here 
https://github.com/PLplot/PLplot/blob/master/drivers/wxwidgets_dev.cpp#L41


I can compile and link plplot.


Hi Laurent:

Thanks for your test of my recent PLplot development activity.

I have looked at commits 14ecc4bd94 (= plplot-5.13.0-59-g14ecc4bd9)
and caf4801dfe (current master tip), and your description of the
required change appears to correspond to copying some wxwidgets includes from
one part of the old commit (or alternatively the latest commit since
those lines haven't changed) to just after

#include "wxwidgets.h"

As far as I can tell such a copy of includes should have zero effect
so it appears either I misunderstood the change you described above or
else the github repo for PLplot is not properly up to date with the
definitive SourceForge repo.  So to remove this uncertainty please
give us the results of

git diff

to describe the definitive version of the change to the master tip of
PLplot that works for you (i.e., allows a static build of PLplot to
compile and link for your VS2017 platform).

By the way, a comprehensive test of PLplot has recently (one commit
behind master tip) worked perfectly here on Linux (Debian Buster).
Such comprehensive tests include not only building a static wxwidgets
device but run-time testing it as well.  Also that last commit on the
master branch is a minor one involving how to control the Lua version
that is searched for and is therefore extremely unlikely to introduce
wxwidgets issues.  Therefore, I cannot replicate your issue on Linux
so someone with access to recent Windows platforms will have to
attempt that instead.

Alan
__
Alan W. Irwin

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
__


___
Plplot-devel mailing list
Plplot-devel@lists.sourceforge.net
https://lists.sourceforge.net/lists/listinfo/plplot-devel


[Plplot-devel] Cannot compile plplot using VS 2017

2018-09-21 Thread Laurent Berger

Hi,

I have just done a git clone : (Date:   Thu Sep 20 22:36:48 2018 -0700
) commit caf4801dfef32207b74f5374eff52bf2a4c24e3d

and delete cmakecache.txt and I I'm trying to build plplot in static

BUILD_SHARED_LIBS:BOOL=OFF

and ENABLE_DYNDRIVERS:BOOL=OFF

and I have got 59 errors compiling wxwidgets_dev.cpp.

In git repo I can find this file 
https://github.com/PLplot/PLplot/blob/14ecc4bd943caa40a830e0da066ff7a220b9d5e8/drivers/wxwidgets.cpp


I copy 
https://github.com/PLplot/PLplot/blob/14ecc4bd943caa40a830e0da066ff7a220b9d5e8/drivers/wxwidgets.cpp#L28-L36 
and insert those lines here 
https://github.com/PLplot/PLplot/blob/master/drivers/wxwidgets_dev.cpp#L41


I can compile and link plplot.




Errors list compiling wxwidgets_dev.cpp:

1>wxwidgets_dev.cpp
1>c:\program files (x86)\windows 
kits\10\include\10.0.16299.0\shared\ws2def.h(103): warning C4005: 
'AF_IPX': macro redefinition
1>c:\program files (x86)\windows 
kits\10\include\10.0.16299.0\um\winsock.h(457): note: see previous 
definition of 'AF_IPX'
1>c:\program files (x86)\windows 
kits\10\include\10.0.16299.0\shared\ws2def.h(147): warning C4005: 
'AF_MAX': macro redefinition
1>c:\program files (x86)\windows 
kits\10\include\10.0.16299.0\um\winsock.h(476): note: see previous 
definition of 'AF_MAX'
1>c:\program files (x86)\windows 
kits\10\include\10.0.16299.0\shared\ws2def.h(185): warning C4005: 
'SO_DONTLINGER': macro redefinition
1>c:\program files (x86)\windows 
kits\10\include\10.0.16299.0\um\winsock.h(399): note: see previous 
definition of 'SO_DONTLINGER'
1>c:\program files (x86)\windows 
kits\10\include\10.0.16299.0\shared\ws2def.h(235): error C2011: 
'sockaddr': 'struct' type redefinition
1>c:\program files (x86)\windows 
kits\10\include\10.0.16299.0\um\winsock.h(1007): note: see declaration 
of 'sockaddr'
1>c:\program files (x86)\windows 
kits\10\include\10.0.16299.0\shared\ws2def.h(437): error C2059: syntax 
error: 'constant'
1>c:\program files (x86)\windows 
kits\10\include\10.0.16299.0\shared\ws2def.h(437): error C3805: 
'constant': unexpected token, expected either '}' or a ','
1>c:\program files (x86)\windows 
kits\10\include\10.0.16299.0\shared\ws2def.h(572): warning C4005: 
'IN_CLASSA': macro redefinition
1>c:\program files (x86)\windows 
kits\10\include\10.0.16299.0\um\winsock.h(284): note: see previous 
definition of 'IN_CLASSA'
1>c:\program files (x86)\windows 
kits\10\include\10.0.16299.0\shared\ws2def.h(578): warning C4005: 
'IN_CLASSB': macro redefinition
1>c:\program files (x86)\windows 
kits\10\include\10.0.16299.0\um\winsock.h(290): note: see previous 
definition of 'IN_CLASSB'
1>c:\program files (x86)\windows 
kits\10\include\10.0.16299.0\shared\ws2def.h(584): warning C4005: 
'IN_CLASSC': macro redefinition
1>c:\program files (x86)\windows 
kits\10\include\10.0.16299.0\um\winsock.h(296): note: see previous 
definition of 'IN_CLASSC'
1>c:\program files (x86)\windows 
kits\10\include\10.0.16299.0\shared\ws2def.h(595): warning C4005: 
'INADDR_ANY': macro redefinition
1>c:\program files (x86)\windows 
kits\10\include\10.0.16299.0\um\winsock.h(301): note: see previous 
definition of 'INADDR_ANY'
1>c:\program files (x86)\windows 
kits\10\include\10.0.16299.0\shared\ws2def.h(597): warning C4005: 
'INADDR_BROADCAST': macro redefinition
1>c:\program files (x86)\windows 
kits\10\include\10.0.16299.0\um\winsock.h(303): note: see previous 
definition of 'INADDR_BROADCAST'
1>c:\program files (x86)\windows 
kits\10\include\10.0.16299.0\shared\ws2def.h(633): error C2011: 
'sockaddr_in': 'struct' type redefinition
1>c:\program files (x86)\windows 
kits\10\include\10.0.16299.0\um\winsock.h(1011): note: see declaration 
of 'sockaddr_in'
1>c:\program files (x86)\windows 
kits\10\include\10.0.16299.0\um\winsock2.h(136): error C2011: 'fd_set': 
'struct' type redefinition
1>c:\program files (x86)\windows 
kits\10\include\10.0.16299.0\um\winsock.h(1019): note: see declaration 
of 'fd_set'
1>c:\program files (x86)\windows 
kits\10\include\10.0.16299.0\um\winsock2.h(156): warning C4005: 
'FD_CLR': macro redefinition
1>c:\program files (x86)\windows 
kits\10\include\10.0.16299.0\um\winsock.h(94): note: see previous 
definition of 'FD_CLR'
1>c:\program files (x86)\windows 
kits\10\include\10.0.16299.0\um\winsock2.h(171): warning C4005: 
'FD_SET': macro redefinition
1>c:\program files (x86)\windows 
kits\10\include\10.0.16299.0\um\winsock.h(99): note: see previous 
definition of 'FD_SET'
1>c:\program files (x86)\windows 
kits\10\include\10.0.16299.0\um\winsock2.h(180): error C2011: 'timeval': 
'struct' type redefinition
1>c:\program files (x86)\windows 
kits\10\include\10.0.16299.0\um\winsock.h(1035): note: see declaration 
of 'timeval'
1>c:\program files (x86)\windows 
kits\10\include\10.0.16299.0\um\winsock2.h(236): error C2011: 'hostent': 
'struct' type redefinition
1>c:\program files (x86)\windows 
kits\10\include\10.0.16299.0\um\winsock.h(1023): note: see declaration 
of 'hostent'
1>c:\program files (x86)\windows