Hi Andrew
Thanks for the reply. I managed to get the build working by deleting the 
contents of my build directories and starting again from scratch. I don't know 
what the issue was. Perhaps I should do this every time I udpdate.
 
However I've found another issue. To date I haven't been able to build the 
examples easily because I use unicode flags to build unicode versions of 
plplot, however, the examples still try to link with the non-unicode version of 
wxwidgets so fail to build.
 
I found this site http://wiki.wxwidgets.org/CMake which gave instructions for 
setting the correct version of wxwidgets. I added 
-DwxWidgets_CONFIGURATION="mswu" to my build command line (for the release 
build), but started generating link errors because my plplot library was 
linking to a debug version of the runtime library as well as the release 
version. After some hunting I found that the wxwidgets files were being passed 
UNICODE;_UNICODE;_DEBUG;__WXDEBUG__ for preprocessor definitions. Without 
specifying the configuration they get passed -D_DEBUG;__WXDEBUG__. These are 
both for release builds, in the latter case the (accidental?) -D means we don't 
define _DEBUG and don't run into the linker problems.
 
I've looked at findwxwidgets.cmake and this always passes out 
wxWidgets_DEFINITIONS_DEBUG containing _DEBUG;__WXDEBUG__, (for release and 
debug builds) but wxWidgets_DEFINITIONS, is empty in the default case or 
contains UNICODE;_UNICODE when I specify the configuration
I guess there are two bugs in wxwidgets.cmake. One that passes the debug flags 
to the release builds and another that prepends the -D in some cases (when 
wxWidgets_DEFINITIONS is empty?) which has covered up the first bug. That said 
I don't fully understand cmake files so I may be mistaken. I've tried to look 
at wxwidgets.cmake, but I just don't understand it well enough to debug it.
 
Phil
 

________________________________
 From: Andrew Ross <[email protected]>
To: phil rosenberg <[email protected]> 
Cc: "[email protected]" <[email protected]> 
Sent: Thursday, 22 November 2012, 14:19
Subject: Re: [Plplot-devel] build error
  

Phil,

This is a little odd as it the FindShapelib.cmake file is just using
standard cmake calls like find_library and find_path. These should
honour your set variables. In fact it looks like they do, except that
they are treating them as relative paths so tack your current
directory on the front?

This same approach is used to find a lot of other libraries. Do you
see similar problems looking for other libraries? (N.B. not wxwidgets
as this uses pkg-config usually).

You might want to try adding additional messages in to see exactly
where your variables are being modified. 

Finally, what version of cmake are you using?

Thanks

Andrew

On Thu, Nov 22, 2012 at 04:26:09AM -0800, phil rosenberg wrote:
> I've just started having some problems building plplot. I run cmake to 
> generate a visual studio project, but when I try to build I get the error
> ??
> c1 : fatal error C1083: Cannot open source file: 
> 'D:/SourceCode/Libraries/shapelib-1.3.0/include/shapelib': Permission denied
> ??
> It's not surprising that it can't open that file, because it is in fact a 
> directory. Checking the cmake output I found:
> ??
> FindShapelib: Found shapelib header directory, 
> D:/SourceCode/Libraries/plplot_trunk_staticbuild_debug/ 
> D:/SourceCode/Libraries/shapelib-1.3.0/include/shapelib, and library, 
> D:/SourceCode/Libraries/plplot_trunk_staticbuild_debug/ 
> D:/SourceCode/Libraries/shapelib-1.3.0/lib/shapelibsd.lib.
> ??
> Which seems incorrect.
> ??
> To specify the location of shapelib I use the following options
> ??
> -DHAVE_SHAPELIB=ON
> -DSHAPELIB_INCLUDE_DIR=" 
> D:/SourceCode/Libraries/shapelib-1.3.0/include/shapelib"
> ???DSHAPELIB_LIBRARY=" 
> D:/SourceCode/Libraries/shapelib-1.3.0/lib/shapelibs.lib" ??
> ??
> I noticed there was a change to the cmake files regarding shapelib since my 
> last update. Is there anything that could have brocken the build?
> ??
> Phil

> ------------------------------------------------------------------------------
> Monitor your physical, virtual and cloud infrastructure from a single
> web console. Get in-depth insight into apps, servers, databases, vmware,
> SAP, cloud infrastructure, etc. Download 30-day Free Trial.
> Pricing starts from $795 for 25 servers or applications!
> http://p.sf.net/sfu/zoho_dev2dev_nov

> _______________________________________________
> Plplot-devel mailing list
> [email protected]
> https://lists.sourceforge.net/lists/listinfo/plplot-devel
------------------------------------------------------------------------------
Monitor your physical, virtual and cloud infrastructure from a single
web console. Get in-depth insight into apps, servers, databases, vmware,
SAP, cloud infrastructure, etc. Download 30-day Free Trial.
Pricing starts from $795 for 25 servers or applications!
http://p.sf.net/sfu/zoho_dev2dev_nov
_______________________________________________
Plplot-devel mailing list
[email protected]
https://lists.sourceforge.net/lists/listinfo/plplot-devel

Reply via email to