Re: [Plplot-devel] Cmake generation with wxWidgets on Windows

2016-12-18 Thread Pedro Vicente
Hi Alan

>My point is CMake find commands only look for a certain tiny subset of a 
>given
>installation, and if you haven't clobbered anything in that subset it won't 
>detect
>anything wrong.  But of course when you try and build and run with
>Visual Studio, the missing .lib files were detected.

yes that was what happened.
In the end the missing files are detected, but I was under the impression 
that the cmake
step would detect the missing files when I assumed they were there, 
therefore my original report
(where I was thinking the files existed, it was only after sending the first 
report that I noticed they did not exist).

all good then

-Pedro

- Original Message - 
From: "Alan W. Irwin" <ir...@beluga.phys.uvic.ca>
To: "Pedro Vicente" <pedro.vice...@space-research.org>
Cc: "PLplot development list" <plplot-devel@lists.sourceforge.net>
Sent: Sunday, December 18, 2016 2:28 AM
Subject: Re: [Plplot-devel] Cmake generation with wxWidgets on Windows


> On 2016-12-17 19:25-0500 Pedro Vicente wrote:
>
>>
>> Hi Alan
>>
>>> (3) Static PLplot libraries + device driver code embedded in our core
>>> static library (identified by its "plplot" basename).
>>
>> I always use (3).
>>
>> I repeated what I had done before:
>>
>> My wxwidgets libraries are located at
>>
>> M:\wx\wxwidgets-3.1.0\lib\vc_lib
>>
>> here there are several .lib files like this one
>>
>> wxmsw31ud_core.lib
>>
>> 1) I deleted all .lib files from that location
>> 2) did a PLplot cmake run with
>>
>> cmake ".." -G "Visual Studio 
>> 14" -DPL_DOUBLE:BOOL=ON -DBUILD_TEST:BOOL=ON 
>> -DCMAKE_CONFIGURATION_TYPES:STRING="Debug" 
>>  -DCMAKE_BUILD_TYPE:STRING="Debug" -DBUILD_SHARED_LIBS:BOOL=OFF 
>> -DSTATIC_RUNTIME:BOOL=ON 
>>  -DPLD_wxwidgets:BOOL=ON -DwxWidgets_ROOT_DIR:PATH=%WXWIN% 
>> -DwxWidgets_LIB_DIR:PATH=%WXWIN%\lib\vc_lib 
>>  -DwxWidgets_CONFIGURATION=mswud 
>> -DwxWidgets_EXCLUDE_COMMON_LIBRARIES:BOOL=OFF
>>> cmake.out.txt 2>&1
>>
>> where
>> %WXWIN%
>> is
>> M:\wx\wxwidgets-3.1.0
>>
>> cmake.out.txt  is attached and it detected wxwidgets
>>
>> 2) Built the Visual Studio generated solution and got the wxwidgets 
>> linking errors
>>
>> 4) rebuilt wxwidgets libraries at M:\wx\wxwidgets-3.1.0\lib\vc_lib
>>
>> 5) did the same  PLplot cmake run
>>
>> 6) Built the Visual Studio generated solution , no errors
>
> Hi Pedro:
>
> Am I understanding your test properly?  You clobbered your wxwidgets
> installation (by removing the .lib files), our build system did not
> detect those removed .lib files, but Visual Studio did in step 2.  You
> fixed that wxwidgets installation issue, ran cmake again, and this
> time Visual Studio worked.  Isn't this exactly how you would like
> our build system to work in conjunction with Visual Studio?
>
> My point is CMake find commands only look for a certain tiny subset of a 
> given
> installation, and if you haven't clobbered anything in that subset it 
> won't detect
> anything wrong.  But of course when you try and build and run with
> Visual Studio, the missing .lib files were detected.
>
> Anyhow, I don't see anything wrong here.  Am I missing something?
>
>>
>> I took a look at the PLplot
>> FindwxWidgets.cmake
>> module and it seems that there is an attempt to find the wxwidgets 
>> libraries (the actual file names), here
>>
>> find_library(WX_${LIB}${_DBG}
>>   NAMES
>>   wxbase31${_UCD}${_DBG}_${LIB}
>>
>>
>> so, not sure exactly what happened, and probably we could leave this 
>> possible non-critical bug for after the release (if it's a bug).
>
> As far as I can tell from the above argument it is not a bug.  But if it
> turns out to be a bug, I will likely wait to fix it until post-release
> because it doesn't seem to be release critical (if a bug at all).
>
>>
>> I started using cmake in my projects some months ago, and what I do to 
>> detect libraries is like this,
>> an example for the JSON jansson library:
>>
>>
>> find_library(JANSSON_LIBRARY NAMES jansson HINTS 
>> "/data/data127/pvicente/install/jansson-2.9/lib/")
>> if(NOT JANSSON_LIBRARY)
>> message(FATAL_ERROR "jansson library not found")
>> else()
>> message("-- Found jansson library at: " ${JANSSON_LIBRARY})
>> endif()
>
> Good.
>
> []
>> Here's my Windows call (the path like /C/ is because this is in Git Bash)
>>
>> cmak

Re: [Plplot-devel] Cmake generation with wxWidgets on Windows

2016-12-17 Thread Alan W. Irwin
On 2016-12-17 19:25-0500 Pedro Vicente wrote:

>
> Hi Alan
>
>> (3) Static PLplot libraries + device driver code embedded in our core
>> static library (identified by its "plplot" basename).
>
> I always use (3).
>
> I repeated what I had done before:
>
> My wxwidgets libraries are located at
>
> M:\wx\wxwidgets-3.1.0\lib\vc_lib
>
> here there are several .lib files like this one
>
> wxmsw31ud_core.lib
>
> 1) I deleted all .lib files from that location
> 2) did a PLplot cmake run with
>
> cmake ".." -G "Visual Studio 14" -DPL_DOUBLE:BOOL=ON -DBUILD_TEST:BOOL=ON 
> -DCMAKE_CONFIGURATION_TYPES:STRING="Debug" -DCMAKE_BUILD_TYPE:STRING="Debug" 
> -DBUILD_SHARED_LIBS:BOOL=OFF -DSTATIC_RUNTIME:BOOL=ON -DPLD_wxwidgets:BOOL=ON 
> -DwxWidgets_ROOT_DIR:PATH=%WXWIN% -DwxWidgets_LIB_DIR:PATH=%WXWIN%\lib\vc_lib 
> -DwxWidgets_CONFIGURATION=mswud -DwxWidgets_EXCLUDE_COMMON_LIBRARIES:BOOL=OFF 
>> cmake.out.txt 2>&1
>
> where
> %WXWIN%
> is
> M:\wx\wxwidgets-3.1.0
>
> cmake.out.txt  is attached and it detected wxwidgets
>
> 2) Built the Visual Studio generated solution and got the wxwidgets linking 
> errors
>
> 4) rebuilt wxwidgets libraries at M:\wx\wxwidgets-3.1.0\lib\vc_lib
>
> 5) did the same  PLplot cmake run
>
> 6) Built the Visual Studio generated solution , no errors

Hi Pedro:

Am I understanding your test properly?  You clobbered your wxwidgets
installation (by removing the .lib files), our build system did not
detect those removed .lib files, but Visual Studio did in step 2.  You
fixed that wxwidgets installation issue, ran cmake again, and this
time Visual Studio worked.  Isn't this exactly how you would like
our build system to work in conjunction with Visual Studio?

My point is CMake find commands only look for a certain tiny subset of a given
installation, and if you haven't clobbered anything in that subset it won't 
detect
anything wrong.  But of course when you try and build and run with
Visual Studio, the missing .lib files were detected.

Anyhow, I don't see anything wrong here.  Am I missing something?

>
> I took a look at the PLplot
> FindwxWidgets.cmake
> module and it seems that there is an attempt to find the wxwidgets libraries 
> (the actual file names), here
>
> find_library(WX_${LIB}${_DBG}
>   NAMES
>   wxbase31${_UCD}${_DBG}_${LIB}
>
>
> so, not sure exactly what happened, and probably we could leave this possible 
> non-critical bug for after the release (if it's a bug).

As far as I can tell from the above argument it is not a bug.  But if it
turns out to be a bug, I will likely wait to fix it until post-release
because it doesn't seem to be release critical (if a bug at all).

>
> I started using cmake in my projects some months ago, and what I do to detect 
> libraries is like this,
> an example for the JSON jansson library:
>
>
> find_library(JANSSON_LIBRARY NAMES jansson HINTS 
> "/data/data127/pvicente/install/jansson-2.9/lib/")
> if(NOT JANSSON_LIBRARY)
> message(FATAL_ERROR "jansson library not found")
> else()
> message("-- Found jansson library at: " ${JANSSON_LIBRARY})
> endif()

Good.

[]
> Here's my Windows call (the path like /C/ is because this is in Git Bash)
>
> cmake .. -DSTATIC_CRT:BOOL=ON -DJANSSON_INCLUDE:PATH=/C/include 
> -DJANSSON_LIBRARY=/C/lib/jansson.lib
>
>
> my library file is actually called (extra _d)
> /C/lib/jansson_d.lib
>
> and cmake said
>
> -- Found jansson.h header file at: C:/include
> -- Found jansson library at: C:/lib/jansson.lib

find_library (in fact, all the CMake find technology) is a no-op if
you specify the answer it is trying to determine (JANSSON_LIBRARY).
So if your specification (-DJANSSON_LIBRARY=/C/lib/jansson.lib) 
points to a file that doesn't exist, CMake will happily accept that
and move on.  However, if you don't specify, CMake find technology
will only find existing files.

>
> then when I build Visual Studio I get
>
> LINK : fatal error LNK1104: cannot open file 'C:\lib\jansson.lib'
>
> my understanding is that
> find_library
>
> does not actually detect if the argument is an existent file

That depends, see above.

>
> Or could be that it does not because I am using the same variable name 
> JANSSON_LIBRARY
> for both the argument of
> cmake .. -DJANSSON_LIBRARY
> and
> find_library(JANSSON_LIBRARY
>
> so , this print
> -- Found jansson library at: C:/lib/jansson.lib
>
> is not actually true for this example.

Exactly.  You have specified what find_library was trying to
determine, and the CMake find technology is designed following the
philosophy that the customer must always be right.  :-)

So it is better if you tell CMake as little as possible with
command-line options in case you make some mistake with those as
in the above example.  Also, try

cmake --help-full |less

to look at complete documentation of cmake.  So within
that less command you can look for the regexp "find_library$", and
there you will find (heh) everything you need to know
about that command and how to influence its results (e.g.,
by 

Re: [Plplot-devel] Cmake generation with wxWidgets on Windows

2016-12-17 Thread Pedro Vicente

attached

cmake.out.txt = first cmake run without existing .libs

cmake.out.2.txt = second cmake run with existing .libs

- Original Message - 
From: "Pedro Vicente" <pedro.vice...@space-research.org>

To: "Alan W. Irwin" <ir...@beluga.phys.uvic.ca>
Cc: "PLplot development list" <plplot-devel@lists.sourceforge.net>
Sent: Saturday, December 17, 2016 7:25 PM
Subject: Re: [Plplot-devel] Cmake generation with wxWidgets on Windows




Hi Alan


(3) Static PLplot libraries + device driver code embedded in our core
static library (identified by its "plplot" basename).


I always use (3).

I repeated what I had done before:

My wxwidgets libraries are located at

M:\wx\wxwidgets-3.1.0\lib\vc_lib

here there are several .lib files like this one

wxmsw31ud_core.lib

1) I deleted all .lib files from that location
2) did a PLplot cmake run with

cmake ".." -G "Visual Studio
14" -DPL_DOUBLE:BOOL=ON -DBUILD_TEST:BOOL=ON 
-DCMAKE_CONFIGURATION_TYPES:STRING="Debug"
-DCMAKE_BUILD_TYPE:STRING="Debug" -DBUILD_SHARED_LIBS:BOOL=OFF 
-DSTATIC_RUNTIME:BOOL=ON
-DPLD_wxwidgets:BOOL=ON -DwxWidgets_ROOT_DIR:PATH=%WXWIN% 
-DwxWidgets_LIB_DIR:PATH=%WXWIN%\lib\vc_lib
-DwxWidgets_CONFIGURATION=mswud -DwxWidgets_EXCLUDE_COMMON_LIBRARIES:BOOL=OFF
> cmake.out.txt 2>&1

where
%WXWIN%
is
M:\wx\wxwidgets-3.1.0

cmake.out.txt  is attached and it detected wxwidgets

2) Built the Visual Studio generated solution and got the wxwidgets 
linking

errors

4) rebuilt wxwidgets libraries at M:\wx\wxwidgets-3.1.0\lib\vc_lib

5) did the same  PLplot cmake run

6) Built the Visual Studio generated solution , no errors


I took a look at the PLplot
FindwxWidgets.cmake
module and it seems that there is an attempt to find the wxwidgets 
libraries

(the actual file names), here

find_library(WX_${LIB}${_DBG}
   NAMES
   wxbase31${_UCD}${_DBG}_${LIB}


so, not sure exactly what happened, and probably we could leave this
possible non-critical bug for after the release (if it's a bug).

I started using cmake in my projects some months ago, and what I do to
detect libraries is like this,
an example for the JSON jansson library:


find_library(JANSSON_LIBRARY NAMES jansson HINTS
"/data/data127/pvicente/install/jansson-2.9/lib/")
if(NOT JANSSON_LIBRARY)
 message(FATAL_ERROR "jansson library not found")
else()
 message("-- Found jansson library at: " ${JANSSON_LIBRARY})
endif()

on a typical Unix system where jansson is installed on a standard place I
get this by doing just

cmake ..

-- Found jansson.h header file at: /usr/include
-- Found jansson library at: /usr/lib/i386-linux-gnu/libjansson.so

On a Unix system where I don't have jansson on a standard place , I do the
HINTS option , like

find_library(JANSSON_LIBRARY NAMES jansson HINTS
"/data/data127/pvicente/install/jansson-2.9/lib/")

and I can do also

cmake ..


On a Windows system (or  a Unix system) I provide the option

cmake .. -DJANSSON_LIBRARY=/my/path/to/jansson

Here's my Windows call (the path like /C/ is because this is in Git Bash)

cmake
.. -DSTATIC_CRT:BOOL=ON -DJANSSON_INCLUDE:PATH=/C/include 
-DJANSSON_LIBRARY=/C/lib/jansson.lib


my library file is actually called (extra _d)
/C/lib/jansson_d.lib

and cmake said

-- Found jansson.h header file at: C:/include
-- Found jansson library at: C:/lib/jansson.lib

then when I build Visual Studio I get

LINK : fatal error LNK1104: cannot open file 'C:\lib\jansson.lib'

my understanding is that
find_library

does not actually detect if the argument is an existent file

Or could be that it does not because I am using the same variable name
JANSSON_LIBRARY
for both the argument of
cmake .. -DJANSSON_LIBRARY
and
find_library(JANSSON_LIBRARY

so , this print
-- Found jansson library at: C:/lib/jansson.lib

is not actually true for this example.

Probably it would be possible to actually detect if the file does indeed
exist, but I did it like this to keep things simple

So, the solution I have for
find_library

assumes that the supplied argument
-DJANSSON_LIBRARY
is a valid file

-Pedro



- Original Message - 
From: "Alan W. Irwin" <ir...@beluga.phys.uvic.ca>

To: "Pedro Vicente" <pedro.vice...@space-research.org>
Cc: "PLplot development list" <plplot-devel@lists.sourceforge.net>
Sent: Saturday, December 17, 2016 4:26 AM
Subject: Re: [Plplot-devel] Cmake generation with wxWidgets on Windows



On 2016-12-17 03:30-0500 Pedro Vicente wrote:


false alarm, sorry

what happened is that my wxWidgets libraries were not built.

In Windows , I don't do install, but rather build software and leave it
where it was built, and sometimes delete and rebuild.

In PLplot 5.11.1 the build actually did not include the wxWidgets
projects and files, so it built.
but in the git version it did include the wxWidgets projects and files,
so it failed.

there'

Re: [Plplot-devel] Cmake generation with wxWidgets on Windows

2016-12-17 Thread Pedro Vicente

Hi Alan

> (3) Static PLplot libraries + device driver code embedded in our core
> static library (identified by its "plplot" basename).

I always use (3).

I repeated what I had done before:

My wxwidgets libraries are located at

M:\wx\wxwidgets-3.1.0\lib\vc_lib

here there are several .lib files like this one

wxmsw31ud_core.lib

1) I deleted all .lib files from that location
2) did a PLplot cmake run with

cmake ".." -G "Visual Studio 
14" -DPL_DOUBLE:BOOL=ON -DBUILD_TEST:BOOL=ON 
-DCMAKE_CONFIGURATION_TYPES:STRING="Debug" 
 -DCMAKE_BUILD_TYPE:STRING="Debug" -DBUILD_SHARED_LIBS:BOOL=OFF 
-DSTATIC_RUNTIME:BOOL=ON 
 -DPLD_wxwidgets:BOOL=ON -DwxWidgets_ROOT_DIR:PATH=%WXWIN% 
-DwxWidgets_LIB_DIR:PATH=%WXWIN%\lib\vc_lib 
 -DwxWidgets_CONFIGURATION=mswud -DwxWidgets_EXCLUDE_COMMON_LIBRARIES:BOOL=OFF 
 > cmake.out.txt 2>&1

where
%WXWIN%
is
M:\wx\wxwidgets-3.1.0

 cmake.out.txt  is attached and it detected wxwidgets

2) Built the Visual Studio generated solution and got the wxwidgets linking 
errors

4) rebuilt wxwidgets libraries at M:\wx\wxwidgets-3.1.0\lib\vc_lib

5) did the same  PLplot cmake run

6) Built the Visual Studio generated solution , no errors


I took a look at the PLplot
FindwxWidgets.cmake
module and it seems that there is an attempt to find the wxwidgets libraries 
(the actual file names), here

find_library(WX_${LIB}${_DBG}
NAMES
wxbase31${_UCD}${_DBG}_${LIB}


so, not sure exactly what happened, and probably we could leave this 
possible non-critical bug for after the release (if it's a bug).

I started using cmake in my projects some months ago, and what I do to 
detect libraries is like this,
an example for the JSON jansson library:


find_library(JANSSON_LIBRARY NAMES jansson HINTS 
"/data/data127/pvicente/install/jansson-2.9/lib/")
if(NOT JANSSON_LIBRARY)
  message(FATAL_ERROR "jansson library not found")
else()
  message("-- Found jansson library at: " ${JANSSON_LIBRARY})
endif()

on a typical Unix system where jansson is installed on a standard place I 
get this by doing just

cmake ..

-- Found jansson.h header file at: /usr/include
-- Found jansson library at: /usr/lib/i386-linux-gnu/libjansson.so

On a Unix system where I don't have jansson on a standard place , I do the 
HINTS option , like

find_library(JANSSON_LIBRARY NAMES jansson HINTS 
"/data/data127/pvicente/install/jansson-2.9/lib/")

and I can do also

cmake ..


On a Windows system (or  a Unix system) I provide the option

cmake .. -DJANSSON_LIBRARY=/my/path/to/jansson

Here's my Windows call (the path like /C/ is because this is in Git Bash)

cmake 
.. -DSTATIC_CRT:BOOL=ON -DJANSSON_INCLUDE:PATH=/C/include 
-DJANSSON_LIBRARY=/C/lib/jansson.lib


my library file is actually called (extra _d)
/C/lib/jansson_d.lib

and cmake said

-- Found jansson.h header file at: C:/include
-- Found jansson library at: C:/lib/jansson.lib

then when I build Visual Studio I get

LINK : fatal error LNK1104: cannot open file 'C:\lib\jansson.lib'

my understanding is that
find_library

does not actually detect if the argument is an existent file

Or could be that it does not because I am using the same variable name 
JANSSON_LIBRARY
for both the argument of
cmake .. -DJANSSON_LIBRARY
and
find_library(JANSSON_LIBRARY

so , this print
-- Found jansson library at: C:/lib/jansson.lib

is not actually true for this example.

Probably it would be possible to actually detect if the file does indeed 
exist, but I did it like this to keep things simple

So, the solution I have for
find_library

assumes that the supplied argument
-DJANSSON_LIBRARY
is a valid file

-Pedro



- Original Message - 
From: "Alan W. Irwin" <ir...@beluga.phys.uvic.ca>
To: "Pedro Vicente" <pedro.vice...@space-research.org>
Cc: "PLplot development list" <plplot-devel@lists.sourceforge.net>
Sent: Saturday, December 17, 2016 4:26 AM
Subject: Re: [Plplot-devel] Cmake generation with wxWidgets on Windows


> On 2016-12-17 03:30-0500 Pedro Vicente wrote:
>
>> false alarm, sorry
>>
>> what happened is that my wxWidgets libraries were not built.
>>
>> In Windows , I don't do install, but rather build software and leave it 
>> where it was built, and sometimes delete and rebuild.
>>
>> In PLplot 5.11.1 the build actually did not include the wxWidgets 
>> projects and files, so it built.
>> but in the git version it did include the wxWidgets projects and files, 
>> so it failed.
>>
>> there's the small detail that cmake should have had allerted that 
>> wxWidgets was not built...but probably not important , or could just have 
>> been my mistake somewhere.
>>
>> so the result is for cmake build with wxWidgets
>>
>> Rebuild All: 88 succeeded, 0 failed, 0 skipped =
>
> To give some quic

Re: [Plplot-devel] Cmake generation with wxWidgets on Windows

2016-12-17 Thread Alan W. Irwin
On 2016-12-17 03:30-0500 Pedro Vicente wrote:

> false alarm, sorry
>
> what happened is that my wxWidgets libraries were not built.
>
> In Windows , I don't do install, but rather build software and leave it where 
> it was built, and sometimes delete and rebuild.
>
> In PLplot 5.11.1 the build actually did not include the wxWidgets projects 
> and files, so it built.
> but in the git version it did include the wxWidgets projects and files, so it 
> failed.
>
> there's the small detail that cmake should have had allerted that wxWidgets 
> was not built...but probably not important , or could just have been my 
> mistake somewhere.
>
> so the result is for cmake build with wxWidgets
>
> Rebuild All: 88 succeeded, 0 failed, 0 skipped =

To give some quick background for my answer,
our build system enables three principal configurations:

(1) Shared PLplot libraries + dll device drivers which are dynamically loaded by
our core shared library (identified by its "plplot" basename).

(2) Shared PLplot libraries + device driver code embedded in our core
shareded library (identified by its "plplot" basename).

(3) Static PLplot libraries + device driver code embedded in our core
static library (identified by its "plplot" basename).

In case (1) the wxwidgets device driver dll (with basename of wxwidgets)
exists, but otherwise that dll does not exist for cases (2) and (3).
Of course, that device driver dll must be distinguished from
the wxwidgets binding library (identified with the basename of
plplotwxwidgets) which exists in all 3 cases, and which in
cases (1) and (2) will be shared and in case (3) will be static.

I am not sure whether you are referring to the wxwidgets device driver
(which if you use a static build will make it become part of the
plplot library) or plplotwxwidgets library above.

As far as I know, our build system handles all build dependencies of
wxwidgets (when it exists for case (1)), our plplot library (both
without [case (1)] and with [cases (2) and (3)] wxwidgets device
driver code embedded in it) and the plplotwxwidgets library.  Can you
give me an example of a wxwidgets-related specific target
(e.g., wxwidgets, plplot, plplotwxwidgets, wxPLviewer,
test_wxPLplotDemo, or even wxPLplotDemo) (where I include plplot in
the list for just cases (2) and (3) and exclude wxwidgets for those cases)
that you attempt to (re)build with your Windows IDE that obviously has
incorrect dependencies?

Also, you cannot change horses in mid-stream, i.e., you cannot change
a build tree that is configured for (1), (2), or (3) into one of the
other cases.  Instead, you have to start fresh with an empty build
tree for each of those three cases.  Is that the source of the
dependency difficulty you have encountered?

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
__

--
Check out the vibrant tech community on one of the world's most 
engaging tech sites, SlashDot.org! http://sdm.link/slashdot
___
Plplot-devel mailing list
Plplot-devel@lists.sourceforge.net
https://lists.sourceforge.net/lists/listinfo/plplot-devel


Re: [Plplot-devel] Cmake generation with wxWidgets on Windows

2016-12-17 Thread Pedro Vicente
false alarm, sorry

what happened is that my wxWidgets libraries were not built.

In Windows , I don't do install, but rather build software and leave it 
where it was built, and sometimes delete and rebuild.

In PLplot 5.11.1 the build actually did not include the wxWidgets projects 
and files, so it built.
but in the git version it did include the wxWidgets projects and files, so 
it failed.

there's the small detail that cmake should have had allerted that wxWidgets 
was not built...but probably not important , or could just have been my 
mistake somewhere.

so the result is for cmake build with wxWidgets

Rebuild All: 88 succeeded, 0 failed, 0 skipped =







- Original Message - 
From: "Pedro Vicente" 
To: "Alan W. Irwin" 
Cc: "PLplot development list" 
Sent: Saturday, December 17, 2016 1:55 AM
Subject: [Plplot-devel] Cmake generation with wxWidgets on Windows


> Hi Alan
>
> I am having linking errors on the latest git clone in Windows when I use
> wxWidgets.
>
> It seems that the all the examples (or plplot.lib) are trying to link with
> wxWidgets , and I get this kind of errors
>
>
> -- Build started: Project: x00c, Configuration: Debug Win32 --
> plplot.lib(wxwidgets.obj) : error LNK2019: unresolved external symbol 
> "void
> __cdecl wxEntryCleanup(void)" (?wxEntryCleanup@@YAXXZ) referenced in
> function __catch$?plD_bop_wxwidgets@@YAXPAUPLStream@@@Z$1
>
>
> I tried the same cmake call on my PLplot 5.11.1 version and no problems, 
> so
> I am sure it's not my cmake call or my wxWidgets.
>
> my cmake call is
>
> cmake ".." -G "Visual Studio
> 14" -DPL_DOUBLE:BOOL=ON -DBUILD_TEST:BOOL=ON 
> -DCMAKE_CONFIGURATION_TYPES:STRING="Debug"
> -DCMAKE_BUILD_TYPE:STRING="Debug" -DBUILD_SHARED_LIBS:BOOL=OFF 
> -DSTATIC_RUNTIME:BOOL=ON
> -DPLD_wxwidgets:BOOL=ON -DwxWidgets_ROOT_DIR:PATH=%WXWIN% 
> -DwxWidgets_LIB_DIR:PATH=%WXWIN%\lib\vc_lib
> -DwxWidgets_CONFIGURATION=mswud -DENABLE_MIX_CXX=ON 
> -DwxWidgets_EXCLUDE_COMMON_LIBRARIES:BOOL=OFF
>
> and the output is attached
>
> I'm trying to figure out this by looking for ${wxwidgets_LINK_FLAGS} in 
> the
> scripts;
> all the mentions of it are below, in 4 different source files.
>
>
>
> P:\plplot\plplot\bindings\wxwidgets\CMakeLists.txt(76):
> target_link_libraries(plplotwxwidgets PRIVATE plplot plplotcxx
> ${wxwidgets_LINK_FLAGS})
>  P:\plplot\plplot\bindings\wxwidgets\CMakeLists.txt(78):
> target_link_libraries(plplotwxwidgets PUBLIC plplot plplotcxx
> ${wxwidgets_LINK_FLAGS})
>  P:\plplot\plplot\bindings\wxwidgets\CMakeLists.txt(119):
> pkg_config_file("wxwidgets" "wxWidgets" " wxWidgets binding"
> "plplotwxwidgets" "${libplplotwxwidgets_COMPILE_FLAGS}"
> "-lplplot;-lplplotcxx;${wxwidgets_LINK_FLAGS}")
>
>  P:\plplot\plplot\cmake\modules\wxwidgets.cmake(27):#
> widgets_LINK_FLAGS   - list of full path names of libraries and
>  P:\plplot\plplot\cmake\modules\wxwidgets.cmake(57):
> cmake_link_flags(wxwidgets_LINK_FLAGS "${wxWidgets_LIBRARIES}")
>  P:\plplot\plplot\cmake\modules\wxwidgets.cmake(58):  if(NOT
> wxWidgets_FOUND OR NOT wxwidgets_LINK_FLAGS)
>  P:\plplot\plplot\cmake\modules\wxwidgets.cmake(65):  else(NOT
> wxWidgets_FOUND OR NOT wxwidgets_LINK_FLAGS)
>  P:\plplot\plplot\cmake\modules\wxwidgets.cmake(68):  endif(NOT
> wxWidgets_FOUND OR NOT wxwidgets_LINK_FLAGS)
>  P:\plplot\plplot\cmake\modules\wxwidgets.cmake(126):  message(STATUS
> "wxwidgets_LINK_FLAGS = ${wxwidgets_LINK_FLAGS}")
>  P:\plplot\plplot\cmake\modules\wxwidgets.cmake(144):
> wxwidgets_LINK_FLAGS
>  P:\plplot\plplot\cmake\modules\wxwidgets.cmake(145):
> ${wxwidgets_LINK_FLAGS}
>  P:\plplot\plplot\cmake\modules\wxwidgets.cmake(156): wxwidgets_LINK_FLAGS
>  P:\plplot\plplot\cmake\modules\wxwidgets.cmake(157):
> ${wxwidgets_LINK_FLAGS}
>  P:\plplot\plplot\cmake\modules\wxwidgets.cmake(183):
> ${wxwidgets_LINK_FLAGS}
>
>  P:\plplot\plplot\examples\c++\CMakeLists.txt(131):
> target_link_libraries(wxPLplotDemo plplotwxwidgets plplotcxx
> ${wxwidgets_LINK_FLAGS} ${MATH_LIB})
>  P:\plplot\plplot\examples\c++\CMakeLists.txt(133):  # Transform
> wxwidgets_LINK_FLAGS from list of libraries to the standard pkg-config 
> form
>  P:\plplot\plplot\examples\c++\CMakeLists.txt(135):
> pkg_config_link_flags(pkg_config_wxwidgets_LINK_FLAGS
> "${wxwidgets_LINK_FLAGS}")
>
>  P:\plplot\plplot\utils\CMakeLists.txt(92):
> target_link_libraries(wxPLViewer plplotwxwidgets plplotcxx
> ${wxwidgets_LINK_FLAGS} ${MATH_LIB} ${RT_LIB})
>  Matching lines: 18Matching files: 4Total files searched: 370
>





> --
> Check out the vibrant tech community on one of the world's most
> engaging tech sites, SlashDot.org! http://sdm.link/slashdot





>