Right I have now gotten to the bottom of all this

The include directories must contain quotes but the link libraries must not.

Presumably the difference is because we pass include directories by first 
prepending -I to them and passing them in as compile flags so they are handed 
straight to the compiler in raw form. Whereas libraries are passed as filenames 
to CMake and are processed before being passed to the compiler.

The only ambiguity left is that I don't know what the situation should be for 
the RPATH variables as I don't really know what they do or how they are used. 
Alan can you advise?

Phil
 



________________________________
 From: phil rosenberg <philip_rosenb...@yahoo.com>
To: Alan W. Irwin <ir...@beluga.phys.uvic.ca> 
Sent: Saturday, 30 August 2014, 12:39
Subject: Re: [Plplot-devel] tcl build problem
  


Hello Alan
Okay so here goes, please bear with me with all this.
1) I am already using CMAKE 3.0. I presume this is from when I had wxWidgets 
problams and was discussing things with Brad.

2) I tried using the nmake generator. It failed. It tried to build a test 
program to test the compiler, which failed - cl.exe reported "could not find 
kernel32.lib." Therefore as CMAKE was unable to find a working c compiler it 
exited. This is obviously ridiculous as I clearly have a working c compiler.

3) I unfortunately don't have time to start fighting with the NMake generator 
so I am returning back to the visual studio generator.

4) The missing piece of information that led to me getting the cMAKE sequence 
correct was that when calling target_link_libraries and adding a library that 
you are building, all libraries added to that library are added as well. Note 
however that (at least for the VS generator) if I add libraries to a library 
they don't actually get added!!! Confused? Well so have I been. Basically we 
add all the dependancies to the plplot library. CMake remembers we have added 
them, but when it creates the plplot project it doesn't actually add them as 
additional dependancies. Then when we add plplot to the examples, it adds all 
the dependancies too. I'm sure you can see why I had a hard time working out 
what was going on and understanding your comments.

4) The output of the CMAKE command is as follows, note that I uncommented the 
lines to output libplplot_LINK_LIBRARIES, just before the target_link_libraries 
call.

D:\usr\local\src\plplot-plplot\build\Visual Studio 11 64sd>cmake "D:\usr\local\s
rc\plplot-plplot" -G "Visual Studio 11 Win64" -DPL_DOUBLE=ON -DBUILD_TEST=ON -DC
MAKE_INSTALL_LIBDIR="D:\usr\local\lib64sd" -DCMAKE_INSTALL_PREFIX="D:\usr\local"
 -DCMAKE_LIBRARY_PATH="D:\usr\local\lib64sd" -DBUILD_SHARED_LIBS=OFF -DCMAKE_CON
FIGURATION_TYPES="Debug" -DSTATIC_RUNTIME=ON -DwxWidgets_CONFIGURATION=mswud -DE
NABLE_d=OFF
-- Explicitly setting policy CMP0022 to OLD
-- Explicitly setting policy CMP0023 to OLD
-- CMake version = 3.0.20140224-g228d0
-- CMAKE_SYSTEM_NAME =
 Windows
-- SH_EXECUTABLE = C:/cygwin64/bin/bash.exe
-- Checking whether system has ANSI C header files
-- Looking for 4 include files stdlib.h, ..., float.h
-- Looking for 4 include files stdlib.h, ..., float.h - found
-- Performing Test memchrExists
-- Performing Test memchrExists - Success
-- Performing Test freeExists
-- Performing Test freeExists - Success
-- Check for whether ctype.h macros work on characters with the
   high bit set.
-- High-bit characters - work
-- ANSI C header files - found
-- Looking for include file unistd.h
-- Looking for include file unistd.h - not found
-- Looking for include file termios.h
-- Looking for include file termios.h - not found
--
 Looking for include file stdint.h
-- Looking for include file stdint.h - found
-- Looking for crt_externs.h
-- Looking for crt_externs.h - not found
-- Performing Test HAVE_SYS_WAIT_H
-- Performing Test
 HAVE_SYS_WAIT_H - Failed
-- Looking for DIR in sys/types.h;dirent.h
-- Looking for DIR in sys/types.h;dirent.h - not found.
-- Looking for DIR in sys/types.h;sys/ndir.h
-- Looking for DIR in sys/types.h;sys/ndir.h - not found.
-- Looking for DIR in sys/types.h;sys/dir.h
-- Looking for DIR in sys/types.h;sys/dir.h - not found.
-- Looking for DIR in sys/types.h;ndir.h
-- Looking for DIR in sys/types.h;ndir.h - not found.
-- Check for signal return type in <signal.h>
-- Check for signal handler return type type void  - found
-- Looking for popen
-- Looking for popen - not found
-- Looking for usleep
-- Looking for usleep - not found
-- Looking for nanosleep
-- Looking for nanosleep - not
 found
-- Looking for mkstemp
-- Looking for mkstemp - not found
-- Looking for mkdtemp
-- Looking for mkdtemp - not found
-- Looking for mkfifo
-- Looking for mkfifo - not found
-- Looking for
 unlink
-- Looking for unlink - found
-- Looking for _NSGetArgc
-- Looking for _NSGetArgc - not found
-- Looking for isfinite
-- Looking for isfinite - not found
-- Looking for finite
-- Looking for finite - not found
-- Looking for finite
-- Looking for finite - not found
-- Looking for _finite
-- Looking for _finite - not found
-- Looking for _finite
-- Looking for _finite - found
-- Looking for isnan
-- Looking for isnan - not found
-- Looking for isnan
-- Looking for isnan - not found
-- Looking for _isnan
-- Looking for _isnan - not found
-- Looking for _isnan
-- Looking for _isnan - found
-- Looking for
 isinf
-- Looking for isinf - not found
-- Looking for isinf
-- Looking for isinf - not found
-- Looking for _isinf
-- Looking for _isinf - not found
-- Looking for _isinf
-- Looking for _isinf - not found
-- Looking for snprintf
-- Looking for snprintf - not
 found
-- Looking for _snprintf
-- Looking for _snprintf - found
-- SWIG was not found. Please specify Swig executable location
-- Found Perl: C:/Program Files (x86)/MiKTeX 2.9/miktex/bin/perl.exe (found vers
ion "5.16.3")
-- WARNING: Perl module XML::Parser not found
-- WARNING: Perl module XML::DOM not found
-- Could NOT find PkgConfig (missing:  PKG_CONFIG_EXECUTABLE)
-- Looking for pkg-config - not found
-- WARNING: Makefile+pkg-config version of examples build in the install tree wi
ll not work.
-- X11_FOUND =
-- X11_INCLUDE_DIR =
-- X11_COMPILE_FLAGS =
-- X11_LIBRARIES =
-- The C compiler identification is MSVC 17.0.61030.0
-- Check for working C compiler using: Visual Studio
 11 2012 Win64
-- Check for working C compiler using: Visual Studio 11 2012 Win64 -- works
-- Detecting C compiler ABI info
-- Detecting C compiler ABI info - done
-- CMAKE_GENERATOR = Visual Studio 11 2012
 Win64
-- The CXX compiler identification is MSVC 17.0.61030.0
-- Check for working CXX compiler using: Visual Studio 11 2012 Win64
-- Check for working CXX compiler using: Visual Studio 11 2012 Win64 -- works
-- Detecting CXX compiler ABI info
-- Detecting CXX compiler ABI info - done
-- Configuring done
-- Generating done
-- Build files have been written to: D:/usr/local/src/plplot-plplot/build/Visual
 Studio 11 64sd/language_tests/CXX
-- Check for using namespace support
-- Check for using namespace - found
-- Looking for C++ include cmath
-- Looking for C++ include cmath - found
-- Check for using stdint.h with CXX compiler
-- Check for using stdint.h with CXX compiler - ok
-- The C compiler
 identification is MSVC 17.0.61030.0
-- Check for working C compiler using: Visual Studio 11 2012 Win64
-- Check for working C compiler using: Visual Studio 11 2012 Win64 -- works
-- Detecting C
 compiler ABI info
-- Detecting C compiler ABI info - done
-- CMAKE_GENERATOR = Visual Studio 11 2012 Win64
-- The Fortran compiler identification is unknown
CMake Error at CMakeLists.txt:33 (enable_language):
  No CMAKE_Fortran_COMPILER could be found.

-- Configuring incomplete, errors occurred!
See also "D:/usr/local/src/plplot-plplot/build/Visual Studio 11 64sd/language_te
sts/Fortran/CMakeFiles/CMakeOutput.log".
See also "D:/usr/local/src/plplot-plplot/build/Visual Studio 11
 64sd/language_te
sts/Fortran/CMakeFiles/CMakeError.log".
-- WARNING: no working Fortran compiler so disabling Fortran bindings and exampl
es.
-- WARNING: Java requires shared libraries. Disabling java bindings
-- WARNING: Python requires shared libraries. Disabling Python bindings
-- WARNING: swig not found. Disabling Octave bindings
-- Start determining consistent system data for Tcl and friends
-- Found Tclsh: C:/Program Files/Tcl/bin/tclsh.exe (found version "8.6")
-- Found TCL: C:/Program Files/Tcl/lib/tcl86.lib
-- Found TCLTK: C:/Program Files/Tcl/lib/tcl86.lib
-- Found TK: C:/Program Files/Tcl/lib/tk86.lib
-- Looking for Tcl - found
-- TCL_INCLUDE_PATH = C:/Program Files/Tcl/include
-- TCL_LIBRARY = C:/Program
 Files/Tcl/lib/tcl86.lib
-- TCL_STUB_LIBRARY = C:/Program Files/Tcl/lib/tclstub86.lib
-- TCL_LIBRARY_PATH = C:/Program Files/Tcl/lib
-- Looking for tclsh - found
-- TCL_TCLSH = C:/Program
 Files/Tcl/bin/tclsh.exe
-- Looking for Tcl version with tclsh - found
-- PLPLOT_TCL_VERSION = 8.6.1
-- Looking for itcl.h
-- Looking for itcl.h - not found
-- WARNING: Disabling Itcl interface code
-- Looking for Tk - found
-- TK_INCLUDE_PATH = C:/Program Files/Tcl/include
-- TK_LIBRARY = C:/Program Files/Tcl/lib/tk86.lib
-- TK_STUB_LIBRARY = C:/Program Files/Tcl/lib/tkstub86.lib
-- TK_LIBRARY_PATH = C:/Program Files/Tcl/lib
-- Looking for wish - found
-- TK_WISH = C:/Program Files/Tcl/bin/wish.exe
-- Looking for Tk version with wish - found
-- Tcl and Tk versions found by both tclsh and wish are identical
-- Looking for itk.h
-- Looking for itk.h - not found
-- WARNING: Disabling Itk
 interface code
-- TCL_RPATH = C:/Program Files/Tcl/lib
-- TCL_TK_RPATH = C:/Program Files/Tcl/lib
-- TCL_TK_ITCL_ITK_RPATH = C:/Program Files/Tcl/lib
-- Finished determining consistent system data for Tcl and
 friends
-- The C compiler identification is MSVC 17.0.61030.0
-- Check for working C compiler using: Visual Studio 11 2012 Win64
-- Check for working C compiler using: Visual Studio 11 2012 Win64 -- works
-- Detecting C compiler ABI info
-- Detecting C compiler ABI info - done
-- CMAKE_GENERATOR = Visual Studio 11 2012 Win64
-- Check for working Ada builder: C:/cygwin64/bin/gnatmake.exe
CMake Error: Could not find cmake module file: CMakeAdaInformation.cmake
CMake Error: Internal CMake error, TryCompile configure of cmake failed
-- Check for working Ada builder: C:C/Mcygawkien 6E4r/rboirn /agtn aDt:m/aukser.
lelxoec a-l-/ sbrrco/kpelnp
ot-plplot/cmake/modules/language_support/cmake/CMakeTestAdaCompiler.cmake:48 (ME
SSAGE):
  The
 Ada builder "C:/cygwin64/bin/gnatmake.exe" is not able to compile,
  bind, and link a simple test program.
  It fails with the following output:


  CMake will not be able to correctly generate this project.
Call Stack (most recent call first):
  CMakeLists.txt:33
 (enable_language)

-- Configuring incomplete, errors occurred!
See also "D:/usr/local/src/plplot-plplot/build/Visual Studio 11 64sd/language_te
sts/Ada/CMakeFiles/CMakeOutput.log".
See also "D:/usr/local/src/plplot-plplot/build/Visual Studio 11 64sd/language_te
sts/Ada/CMakeFiles/CMakeError.log".
-- WARNING: no working Ada compiler so disabling Ada bindings and examples.
-- WARNING: Lua requires shared libraries. Disabling Lua bindings
-- FindShapelib: Found shapelib header directory, D:/usr/local/include, and libr
ary, D:/usr/local/lib64sd/shapelib.lib.
-- Found Freetype:
 D:/usr/local/lib64sd/freetype.lib
-- FREETYPE_CFLAGS = -ID:/usr/local/include/freetype2 -ID:/usr/local/include
-- FREETYPE_LIBRARIES =
 D:/usr/local/lib64sd/freetype.lib
-- Check for NaN awareness in C compiler
-- Check for NaN awareness in C compiler - found
-- WARNING: qhull library not found.  Setting PL_HAVE_QHULL to OFF.
-- WARNING: pango not found because pkg-config not available.
-- WARNING: Shared libraries not built. Setting ENABLE_DYNDRIVERS OFF.
-- WARNING: pkg-config not found. Setting cairo drivers to OFF.
-- WARNING: X11 not found.  Therefore turning off tk and tkwin devices that depe
nd on it
-- TKLIB_COMPILE_FLAGS -I"C:/Program Files/Tcl/include"
-- ntk_COMPILE_FLAGS -I"C:/Program Files/Tcl/include" -I"C:/Program Files/Tcl/in
clude"
-- ntk_LINK_FLAGS "C:/Program Files/Tcl/lib/tcl86.lib";"C:/Program Files/Tcl/lib
/tk86.lib"
-- ntk_RPATH
 "C:/Program Files/Tcl/lib"
-- WARNING: pkg-config not found. Setting PLD_psttf to OFF.
-- Found unsuitable Qt version "" from NOTFOUND
-- WARNING: Suitable Qt4 development
 environment not found so disabling Qt bindi
ngs.
-- WARNING: ENABLE_qt is OFF so setting all qt devices to OFF.
-- WARNING: ENABLE_python is OFF so setting ENABLE_pyqt4 to OFF.
CMake Warning at cmake/modules/qt.cmake:349 (find_package):
  By not providing "FindSmoke.cmake" in CMAKE_MODULE_PATH this project has
  asked CMake to find a package configuration file provided by "Smoke", but
  CMake did not find one.

  Could not find a package configuration file provided by "Smoke" with any of
  the following names:
    SmokeConfig.cmake
    smoke-config.cmake
  Add the installation prefix of "Smoke" to CMAKE_PREFIX_PATH or set
  "Smoke_DIR" to a directory containing one of
 the above files.  If "Smoke"
  provides a separate development package or SDK, be sure it has been
  installed.
Call
 Stack (most recent call first):
  cmake/modules/drivers.cmake:95 (include)
  cmake/modules/plplot.cmake:551 (include)
  CMakeLists.txt:111 (include)

-- WARNING: smoke not found so setting ENABLE_smoke to OFF.
-- Looking for gdi32 header and library
-- Looking for gdi32 header and library - not found
-- WARNING: Setting PLD_wingcc to OFF.
-- wxWidgets found
-- wxwidgets_COMPILE_FLAGS = -ID:/SourceCode/Libraries/wxWidgets-3.0.0/lib/vc_x6
4_lib/mswud -ID:/SourceCode/Libraries/wxWidgets-3.0.0/include -DUNICODE -D_UNICO
DE
-- wxwidgets_LINK_FLAGS =
 D:/SourceCode/Libraries/wxWidgets-3.0.0/lib/vc_x64_lib
/wxbase30ud.lib;D:/SourceCode/Libraries/wxWidgets-3.0.0/lib/vc_x64_lib/wxmsw30ud
_core.lib;D:/SourceCode/Libraries/wxWidgets-3.0.0/lib/vc_x64_lib/wxpngd.lib;D:/S
ourceCode/Libraries/wxWidgets-3.0.0/lib/vc_x64_lib/wxtiffd.lib;D:/SourceCode/Lib
raries/wxWidgets-3.0.0/lib/vc_x64_lib/wxjpegd.lib;D:/SourceCode/Libraries/wxWidg
ets-3.0.0/lib/vc_x64_lib/wxzlibd.lib;D:/SourceCode/Libraries/wxWidgets-3.0.0/lib
/vc_x64_lib/wxregexud.lib;D:/SourceCode/Libraries/wxWidgets-3.0.0/lib/vc_x64_lib
/wxexpatd.lib;winmm;comctl32;rpcrt4;wsock32
-- Could NOT find AGG (missing:  AGG_LIBRARIES AGG_INCLUDE_DIR)
-- WARNING: AGG not found.  Setting HAVE_AGG to OFF.
-- WARNING: wxwidgets driver and bindings components depending on AGG library ha
ve been dropped.
-- Looking for haru pdf header and library
-- Looking for haru pdf header and library - not found
-- WARNING:
 Setting PLD_pdf to OFF.
-- WARNING:Static build with ENABLE_ocaml_static false.  Therefore, disabling oc
aml bindings
-- WARNING:ENABLE_ocaml is OFF so disabling Plcairo module and lablgtk2 support
-- WARNING: validate target will not be available to check for syntax issues in
the PLplot DocBook documentation because onsgmls (or env) was not found.
-- WARNING: execute_process failed to obtain C++ library needed for pkg-config
-- CMAKE_CXX_COMPILER = C:/Program Files (x86)/Microsoft Visual Studio 11.0/VC/b
in/x86_amd64/cl.exe
-- CXX_rc = 2
-- CXX_string = Microsoft (R) C/C++ Optimizing Compiler Version 17.00.61030 for
x64
Copyright (C) Microsoft Corporation.  All rights reserved.
cl : Command line warning D9002 : ignoring unknown option '--verbose'
cl : Command line warning D9002 : ignoring unknown option '--version'
cl : Command line error D8003 : missing source filename
-- WARNING: failed
 to find libstdc++ so pkg-config link flags will be incomplete
-- libplplot_LINK_LIBRARIES = "C:/Program Files/Tcl/lib/tcl86.lib";"C:/Program F
iles/Tcl/lib/tk86.lib";D:/SourceCode/Libraries/wxWidgets-3.0.0/lib/vc_x64_lib/wx
base30ud.lib;D:/SourceCode/Libraries/wxWidgets-3.0.0/lib/vc_x64_lib/wxmsw30ud_co
re.lib;D:/SourceCode/Libraries/wxWidgets-3.0.0/lib/vc_x64_lib/wxpngd.lib;D:/Sour
ceCode/Libraries/wxWidgets-3.0.0/lib/vc_x64_lib/wxtiffd.lib;D:/SourceCode/Librar
ies/wxWidgets-3.0.0/lib/vc_x64_lib/wxjpegd.lib;D:/SourceCode/Libraries/wxWidgets
-3.0.0/lib/vc_x64_lib/wxzlibd.lib;D:/SourceCode/Libraries/wxWidgets-3.0.0/lib/vc
_x64_lib/wxregexud.lib;D:/SourceCode/Libraries/wxWidgets-3.0.0/lib/vc_x64_lib/wx
expatd.lib;winmm;comctl32;rpcrt4;wsock32;D:/usr/local/lib64sd/freetype.lib;D:/us
r/local/lib64sd/shapelib.lib;D:/usr/local/lib64sd/freetype.lib;csirocsa;qsastime
-- WARNING: Perl modules XML::Parser and/or XML::DOM not available
   so cannot check that swig_documentation.i is up to date.
-- ENABLE_itcl: OFF
-- Itcl libraries: plplot;C:/Program Files/Tcl/lib/tcl86.lib
CMake Warning (dev) at bindings/tcl/CMakeLists.txt:490 (get_target_property):
  Policy CMP0026 is not set: Disallow use of the LOCATION target property.
  Run "cmake --help-policy CMP0026" for policy details.  Use the cmake_policy
  command to set the policy and suppress this warning.
  The LOCATION property should not be read from target "plplottcltk".  Use
  the target name directly with add_custom_command, or use the generator
  expression $<TARGET_FILE>, as appropriate.
This warning is for project developers.  Use -Wno-dev to suppress it.
CMake Warning (dev) in src/CMakeLists.txt:
  Policy CMP0026 is not set: Disallow use of the LOCATION target property.
 
 Run "cmake --help-policy CMP0026" for policy details.  Use the cmake_policy
  command to set the policy and suppress this warning.
  The LOCATION property should not be read from target "plplot".  Use the
  target name directly with add_custom_command, or use the generator
  expression $<TARGET_FILE>, as appropriate.
This warning is for project developers.  Use -Wno-dev to suppress it.
-- WARNING: pkg-config not found so plplotcanvas_demo, plplotcanvas_animation,
extXdrawable_demo, and ext-cairo-test not built.
CMake Warning (dev) in bindings/tcl/CMakeLists.txt:
  Policy CMP0026 is not set: Disallow use of the LOCATION target property.
  Run "cmake --help-policy CMP0026" for policy details.  Use the cmake_policy
  command to set the
 policy and suppress this warning.
  The LOCATION property should not be read from target "pltcl".  Use the
  target name directly with add_custom_command, or use the generator
  expression $<TARGET_FILE>, as appropriate.
This warning is for project developers.  Use -Wno-dev to suppress it.
-- WARNING: The test_pltcl_standard_examples target can be run independently on
   the Windows platform, but it generates an unhandled exception at the end so
   it is temporarily excluded from being a dependency of other more general
   interactive test targets
CMake Warning (dev) in bindings/tcl/CMakeLists.txt:
  Policy CMP0026 is not set: Disallow use of the LOCATION target property.
  Run "cmake --help-policy CMP0026" for policy details.  Use the cmake_policy
  command to set the policy and suppress this
 warning.
  The LOCATION property should not be read from target "pltcl".  Use the
  target
 name directly with add_custom_command, or use the generator
  expression $<TARGET_FILE>, as appropriate.
This warning is for project developers.  Use -Wno-dev to suppress it.

Summary of CMake build system results for PLplot
Install location variables which can be set by the user:
CMAKE_INSTALL_PREFIX:      D:/usr/local
CMAKE_INSTALL_EXEC_PREFIX  D:/usr/local
CMAKE_INSTALL_BINDIR       D:/usr/local/bin
CMAKE_INSTALL_DATADIR      D:/usr/local/share
CMAKE_INSTALL_LIBDIR       D:/usr/local/lib64sd
CMAKE_INSTALL_INCLUDEDIR   D:/usr/local/include
CMAKE_INSTALL_INFODIR      D:/usr/local/share/info
CMAKE_INSTALL_MANDIR       D:/usr/local/share/man
Derived install location variables:
DATA_DIR        D:/usr/local/share/plplot5.10.0
LIB_DIR         D:/usr/local/lib64sd
INCLUDE_DIR     D:/usr/local/include/plplot
BIN_DIR         D:/usr/local/bin
TCL_DIR         D:/usr/local/share/plplot5.10.0/tcl
ADA_INCLUDE_DIR D:/usr/local/share/ada/adainclude/plplotada
ADA_LIB_DIR     D:/usr/local/lib64sd/ada/adalib/plplotada
PYTHON_INSTDIR
DRV_DIR         D:/usr/local/lib64sd/plplot5.10.0/drivers
DOC_DIR         D:/usr/local/share/doc/plplot
MAN_DIR         D:/usr/local/share/man
INFO_DIR        D:/usr/local/share/info
Other important CMake variables:
CMAKE_SYSTEM_NAME:      Windows
UNIX:
WIN32:                  1
APPLE:
MSVC:                   1       (MSVC_VERSION:  1700)
MINGW:
MSYS:
CYGWIN:
BORLAND:
WATCOM:
SWIG_FOUND:             FALSE
PERL_FOUND:             TRUE
X11_FOUND:
CMAKE_BUILD_TYPE:
CMAKE_C_COMPILER CMAKE_C_FLAGS:                
 C:/Program Files (x86)/Microsoft
 Visual Studio 11.0/VC/bin/x86_amd64/cl.exe /DUNICODE /D_UNICODE /DWIN32 /D_WIND
OWS /W3
CMAKE_CXX_COMPILER
 CMAKE_CXX_FLAGS:             C:/Program Files (x86)/Microsoft
 Visual Studio 11.0/VC/bin/x86_amd64/cl.exe /DUNICODE /D_UNICODE /DWIN32 /D_WIND
OWS /W3 /GR /EHsc
LIB_TAG:
ENABLE_DYNDRIVERS:      OFF
DRIVERS_LIST: mem;ntk;null;ps;svg;wxwidgets;xfig
DEVICES_LIST: mem;ntk;null;ps;svg;wxwidgets;xfig
Library options:
BUILD_SHARED_LIBS:      OFF             PL_DOUBLE:      ON
Optional libraries:
PL_HAVE_QHULL:          OFF             WITH_CSA:       ON
PL_HAVE_FREETYPE:      
 ON              PL_HAVE_PTHREAD:
HAVE_AGG:               OFF             HAVE_SHAPELIB:  ON
Language Bindings:
ENABLE_ada:             OFF
ENABLE_cxx:             ON
ENABLE_d:               OFF
ENABLE_f95:             OFF
ENABLE_java:            OFF
ENABLE_lua:             OFF
ENABLE_ocaml:          
 OFF
ENABLE_octave:          OFF
ENABLE_pdl:             OFF
ENABLE_python:          OFF
ENABLE_qt:              OFF
ENABLE_pyqt4:           OFF
ENABLE_tcl:             ON
ENABLE_itcl:            OFF
ENABLE_tk:              ON
ENABLE_itk:             OFF
ENABLE_wxwidgets:       ON
-- Configuring done
CMake Warning (dev) at examples/CMakeLists.txt:955 (add_dependencies):
  Policy
 CMP0046 is not set: Error on non-existent dependency in
  add_dependencies.  Run "cmake --help-policy CMP0046" for policy details.
  Use the cmake_policy command to set the policy and suppress this warning.
  The dependency target "ntk" of target "test_pltcl_standard_examples" does
  not exist.
This warning is for project developers.  Use -Wno-dev to suppress it.
CMake Warning (dev) in bindings/wxwidgets/CMakeLists.txt:
  Policy CMP0043 is not set: Ignore COMPILE_DEFINITIONS_<Config> properties.
  Run "cmake --help-policy CMP0043" for policy details.  Use the cmake_policy
  command to set the policy and suppress this warning.
This warning is for project developers.  Use -Wno-dev to suppress it.
-- Generating done
-- Build
 files have been written to: D:/usr/local/src/plplot-plplot/build/Visual
 Studio 11 64sd


5)You will notice that at this point the extra .lib has not been appended. 
Which makes me conclude this is a CMake bug. presumably somewhere it checks if 
the libraries end in .lib and if not it appends this suffix, but fails to 
account for quoted paths.

6) I have also included the cake.cache zipped as an attachment.


7)Frustratingly these build problems just keep on coming up in Windows - 
Windows is rather more ad-hoc with building from source than Linux. Often 
libraries are not where one might expect and people regularly use static 
libraries and static runtimes. Then there is the Unicode issue. On Linux the 
runtime is included with the distro so in general everyone uses dynamic runtime 
and as Linux has a package manager things are almost always where you expect 
and it is generally relatively easy to add a dependant library if it is missing 
and deal with dll hell. I'm not sure what the suitable answer is - I'm not sure 
if there is any way to become less dependant upon Cmake or even if that would 
be a good thing. It's just a shame CMake isn't at a stage yet where it "just 
works" on Windows.

Phil



 


 From: Alan W. Irwin <ir...@beluga.phys.uvic.ca>
To: Phil Rosenberg <philip_rosenb...@yahoo.com> 
Cc: PLplot development list <plplot-devel@lists.sourceforge.net> 
Sent: Friday, 29 August 2014, 20:12
Subject: RE: [Plplot-devel] tcl build problem
  

On 2014-08-29 18:22+0100 Phil Rosenberg wrote:

> Hi Alan
> Got both your messages. Unfortunately that cannot be where the external 
> libraries are linked into the examples as I am building static libraries so 
> almost that entire file (including the section you indicated) is skipped.
> Just to be clear, Plplot itself is building fine, the linker error is when 
> building the examples.

When the plplot library is built as a static library, the devices are
no longer independent DLL's, and instead the device code is inserted
into the plplot library so all device compile flags and link flags
need to be accumulated for that library.  Of course, that is pretty
difficult to get all that implemented correctly because of the large
number of device drivers with many different dependencies so note my
remarks
 below about also testing the default shared plplot
library/dynamic devices case.

The relevant CMake logic for the static plplot library case is in
src/CMakeLists.txt (where the plplot library build is configured).  In
that case look for

else(ENABLE_DYNDRIVERS)
   list(APPEND libplplot${LIB_TAG}_LINK_LIBRARIES ${DRIVERS_LINK_FLAGS})
   [...]
endif(ENABLE_DYNDRIVERS)
[...]
#message(STATUS
#"libplplot${LIB_TAG}_LINK_LIBRARIES =
${libplplot${LIB_TAG}_LINK_LIBRARIES}"
#)

target_link_libraries(
   plplot${LIB_TAG}
   ${libplplot${LIB_TAG}_LINK_LIBRARIES}
   )

You should uncomment
 that message command to look at the
CMake list in libplplot${LIB_TAG}_LINK_LIBRARIES to see if there is
anything strange there in the static libraries case. Of course, you
have stated that the static plplot library is building OK, but the
trouble you are having with example
 builds may originate in
how that library is built.

What you said before about the extra .lib issue was

'This allows me to compile, but I am getting linker errors in the
examples, because the
linker flags are ending up as
"C:/Program Files/Tcl/lib/tcl86.lib".lib'

To proceed further I need complete information.  Therefore, please
send the usual that I always request for a complete bug report:

cmake version,
complete cmake options used,
complete output from cmake command starting from initially empty build tree,
complete (VERBOSE=1) output from (n)make command,
CMakeCache.txt file.

The first two items you can send just as part of the main text part
 of
your next post here, but the remaining items should be packed into a
compressed tarball or zip file and attached to that same post.

Here are some further possibilities to consider:

Use CMake-2.8.12.2 and the NMake generator
 (for the reasons I gave before).

Also, the static plplot library case is not nearly as well debugged
for our build system as the default shared libraries/dynamic devices
case. Therefore, I would also try that default case (which would be an
additional valuable test of building the Tcl/Tk bindings for your
platform).  Of course, remember to use the -DTEST_DYNDRIVERS=OFF
workaround that is normally required for this case on Windows (to
avoid doing the simple test of dynamic devices that fails on Windows
when the same test with essentially the same code succeeds when run
from the plplot library on Windows!  Go figure....)

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
__________________________
------------------------------------------------------------------------------
Slashdot TV.  
Video for Nerds.  Stuff that matters.
http://tv.slashdot.org/
_______________________________________________
Plplot-devel mailing list
Plplot-devel@lists.sourceforge.net
https://lists.sourceforge.net/lists/listinfo/plplot-devel

Reply via email to