Hi Thorston,

do you still need help with plplot on Windows. Although, I'm using VS 2008, here a short step by step description how I made it compile and run:

Used components:

PLplot 5.9.7

cmake 2.8.4

VS 2008 Express

  1. Open the Visual Studio Command Prompt
  2. cd c:\
  3. mkdir plplot
  4. cd plplot
  5. mkdir install
  6. mkdir package
  7. mkdir build
  8. cd build
  9. -> than copy the whole content of the plplot-5.9.7 package into the
    c:\plplot\package directory
  10. than copy wxWidgets c:\plplot (in my case, I did this, because I have no wxWidgets installed and I also do not want to install it, because I have to use exactly the version which is in our internal subversion)
  11. set path=c:\plplot\build\dll;%path%
  12. set WXWIN=c:\plplot\wxWidgets
  13. set WXWINDLL=%WXWIN%\lib\vc_dll
  14. cmake c:\plplot\package -G "NMake Makefiles" -DwxWidgets_ROOT_DIR=%WXWIN% -DwxWidgets_LIB_DIR=%WXWINDLL% -DwxWidgets_CONFIGURATION=mswu -DCMAKE_INSTALL_PREFIX=c:\plplot\install -DENABLE_f77=OFF -DENABLE_f95=OFF -DENABLE_python=OFF -DENABLE_java=OFF -DENABLE_tcl=OFF -DENABLE_itcl=OFF -DENABLE_tk=OFF -DENABLE_itk=OFF -DENABLE_ada=OFF -DENABLE_pdl=OFF -DENABLE_d=OFF -DENABLE_ocaml=OFF -DENABLE_qt=OFF -DENABLE_octave=OFF -DENABLE_lua=OFF -DDEFAULT_NO_QT_DEVICES=ON -DHAVE_QHULL=OFF -DWITH_FREETYPE=OFF -DBUILD_TEST=ON -DCMAKE_BUILD_TYPE=Release -DENABLE_DYNDRIVERS=OFF
  15. nmake
  16. nmake install

ATTENTION: (before I run cmake, I had to do the following)

In the file: C:\plplot\package\cmake\modules\FindwxWidgets.cmake

I had to comment out the line:

SET(wxWidgets_DEFINITIONS_DEBUG _DEBUG __WXDEBUG__)

Without doing that, the debug system libs where used for a part of the plplot build. I do not know, why the automatic detection went wrong here.

Good Luck!

Michal

On Wednesday 27 July 2011 16:51, Thorsten Behrens wrote:

> Hi!

>

> I'm trying to get PLplot working together with wxWidgets and Microsoft

> Visual C++ 1020 (Express Edition), but unfortunately I'm getting nowhere.

>

> I've downloaded and installed CMake 2.8 ... no problem.

> I've downloaded and installed wxWidgets 2.9.1 ... no problem.

> I've downloaded PLplot v5.9.7 and I'm currently trying to install it but

> this is where my problems start :-(

>

> Here's what I'm doing exactly:

>

> 1. I'm starting vcvarsall.bat in a Windows command line environment with

> admin rights.

> 2. Then I'm creating a new folder "build" parallel to the folder

> "plplot-5.9.7" of the downloaded PLplot.

> 3. I'm adding the subfolder (not yet created) "...\build\dll" to my path.

> 4. I'm executing: cmake -D BUILD_TEST=ON -G "Visual Studio 10"

> c:\users\thorsten\downloads\plplot\plplot-5.9.7

>

> CMake then does some work producing lots of output. What strikes me odd

> here is, that no working Ada compiler is found, although I have GNAT

> installed (and can of course compile within GPS without any problems), but

> that is just a side note.

>

> In the end CMake gives the following summary:

> ---snip---

> Summary of CMake build system results for PLplot

>

> Install location variables which can be set by the user:

> CMAKE_INSTALL_PREFIX: C:/Program Files (x86)/plplot

> CMAKE_INSTALL_EXEC_PREFIX C:/Program Files (x86)/plplot

> CMAKE_INSTALL_BINDIR C:/Program Files (x86)/plplot/bin

> CMAKE_INSTALL_DATADIR C:/Program Files (x86)/plplot/share

> CMAKE_INSTALL_LIBDIR C:/Program Files (x86)/plplot/lib

> CMAKE_INSTALL_INCLUDEDIR C:/Program Files (x86)/plplot/include

> CMAKE_INSTALL_INFODIR C:/Program Files (x86)/plplot/share/info

> CMAKE_INSTALL_MANDIR C:/Program Files (x86)/plplot/share/man

>

> Derived install location variables:

> DATA_DIR C:/Program Files (x86)/plplot/share/plplot5.9.7

> LIB_DIR C:/Program Files (x86)/plplot/lib

> INCLUDE_DIR C:/Program Files (x86)/plplot/include/plplot

> BIN_DIR C:/Program Files (x86)/plplot/bin

> TCL_DIR C:/Program Files (x86)/plplot/share/plplot5.9.7/tcl

> ADA_INCLUDE_DIR C:/Program Files

> (x86)/plplot/share/ada/adainclude/plplotadad

> ADA_LIB_DIR C:/Program Files (x86)/plplot/lib/ada/adalib/plplotadad

> PYTHON_INSTDIR

> DRV_DIR C:/Program Files (x86)/plplot/lib/plplot5.9.7/driversd

> DOC_DIR C:/Program Files (x86)/plplot/share/doc/plplot

> MAN_DIR C:/Program Files (x86)/plplot/share/man

> INFO_DIR C:/Program Files (x86)/plplot/share/info

>

> Other important CMake variables:

>

> CMAKE_SYSTEM_NAME: Windows

> UNIX:

> WIN32: 1

> APPLE:

> MSVC: 1 (MSVC_VERSION: 1600)

> MINGW:

> MSYS:

> CYGWIN:

> BORLAND:

> WATCOM:

>

> SWIG_FOUND: FALSE

> PERL_FOUND: FALSE

> X11_FOUND:

>

> CMAKE_BUILD_TYPE:

> CMAKE_C_COMPILER CMAKE_C_FLAGS: c:/Program Files

> (x86)/Microsoft Visual Studio 10.0/VC/bin/cl.exe /DWIN

> 32 /D_WINDOWS /W3 /Zm1000

> CMAKE_CXX_COMPILER CMAKE_CXX_FLAGS: c:/Program Files

> (x86)/Microsoft Visual Studio 10.0/VC/bin/cl.exe /DWIN

> 32 /D_WINDOWS /W3 /Zm1000 /EHsc /GR

> LIB_TAG: d

>

> ENABLE_DYNDRIVERS: ON

> DRIVERS_LIST: mem;null;ps;svg;wingcc;wxwidgets;xfig

> DEVICES_LIST: mem;null;ps;svg;wingcc;wxwidgets;xfig

>

> Library options:

> BUILD_SHARED_LIBS: ON PL_DOUBLE: ON

>

> Optional libraries:

> HAVE_QHULL: OFF WITH_CSA: ON

> HAVE_FREETYPE: HAVE_PTHREAD:

> HAVE_AGG:

>

> Language Bindings:

> ENABLE_f77: OFF ENABLE_f95: OFF

> ENABLE_cxx: ON ENABLE_java: OFF

> ENABLE_python: OFF ENABLE_octave: OFF

> ENABLE_tcl: OFF ENABLE_itcl: OFF

> ENABLE_tk: OFF ENABLE_itk: OFF

> ENABLE_pdl: OFF ENABLE_wxwidgets: ON

> ENABLE_ada: OFF ENABLE_d: OFF

> ENABLE_ocaml: OFF ENABLE_lua: OFF

> ENABLE_qt: OFF ENABLE_pyqt4: OFF

>

> -- Configuring done

> -- Generating done

> -- Build files have been written to:

> C:/Users/Thorsten/Downloads/PLPlot/build

> ---snap---

>

> So, obviously Cmake identifies wxWidgets and also enables a C++ compiler.

> Fine. It also produces a directory tree in the build directory containing

> lots of files.

>

> Then, I'm moving into the build directory using a normal explorer. I'm

> then starting the Microsoft Visual C++ Express 10 by double clicking on

> the plplot.sln file. OK, the programming environment opens and a project

> map with 121 projects is displayed.

>

> I'm then compiling the projects *in the order* they are mentioned in the

> "project build order ..." menu, i.e.

> - ZERO_CHECK

> - deltaT-gen

> - tai-utc-gen

> - plhershey-unicode-gen

> - tai-utc.h_built

> - deltaT.h_built

> - qsastime

> - plhershey-unicode.h_built

> - csirocsa

> - plplotd

>

> Ooops! Here, an error is displayed (all other projects above are compiling

> fine).

>

> ---snip---

> c:\users\thorsten\downloads\plplot\plplot-5.9.7\include\plplotP.h(100):

> fatal error C1083: Datei (Include) kann nicht ge÷ffnet werden:

> "plConfig.h": No such file or directory

> ---snap---

>

> Indeed there is no plConfig.h in the mentioned directory. Howevere, a

> plConfig.h can be found in the ...\build\include directory. If I copy this

> file to ...\plplot-5.9.7\include and compile again, I'm getting a bit

> further, until

>

> ---snip---

> 1>c:\users\thorsten\downloads\plplot\plplot-5.9.7\include\plConfig.h(53):

> fatal error C1083: Datei (Include) kann nicht ge÷ffnet werden: "config.h":

> No such file or directory

> ---snap---

>

> I can copy the missing config.h from the build directory back to the

> plplot-5.9.7 directory, but I wonder if this "copying files back to the

> download directory" is the correct way to get everything installed.

>

> Obviously, there is something wrong with the generated build directory

> tree, but as this is the first steps I'm taking with CMake (and C++ and MS

> Visual Studio), I have no clue as to where to start. Is there somewhere

> who has installed PLplot on Windows using MS Visual Studio 2010 and who is

> willing to help me?

--

Michal Simecek

GenISys GmbH, Eschenstr. 66, D-82024 Taufkirchen

Ph: +49(89) 330 91 97-76; Fax: +49(89) 330 91 97-61